Niqull commited on
Commit
4a04f4f
1 Parent(s): bf0912e

Changed ImageEditor block to match gradio docs

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import gradio as gr
2
 
 
3
  def predict(im):
4
- return im
 
 
 
 
 
 
 
 
 
5
 
6
- demo = gr.Interface(fn=predict, inputs="imageeditor", outputs="text")
7
  demo.launch()
 
1
  import gradio as gr
2
 
3
+
4
  def predict(im):
5
+ return im["composite"]
6
+
7
+
8
+ with gr.Blocks(fill_height=true, fill_width=True) as demo:
9
+ with gr.Row():
10
+ im = gr.ImageEditor(
11
+ type="numpy",
12
+ crop_size="1:1"
13
+ )
14
+ im_preview = gr.Image()
15
 
 
16
  demo.launch()