Gainward777 commited on
Commit
9170df5
·
verified ·
1 Parent(s): c881194

Update ui/gradio_ui.py

Browse files
Files changed (1) hide show
  1. ui/gradio_ui.py +2 -2
ui/gradio_ui.py CHANGED
@@ -17,7 +17,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
17
  with gr.Blocks() as ui:
18
  with gr.Row():
19
  with gr.Column():
20
- sketch=gr.Sketchpad(sources = 'upload', label='Sketch', type='numpy', image_mode="L", brush=gr.Brush()) #gr.Image(sources = 'upload', label='Sketch', type = 'pil')
21
  ser_image=gr.Image(type="pil")#, visible=False)
22
 
23
  with gr.Column():
@@ -52,7 +52,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
52
  inputs=[sketch, first_prompt, second_prompt],
53
  label='Examples. Be concrete as much as possible.')
54
 
55
- sketch.change(fn=get_img_from_sketchpad, inputs=sketch, outputs=ser_image, show_progress="hidden")
56
 
57
  improve_sketch.click(fn=controller.get_first_result,
58
  inputs=[ser_image, first_prompt, first_negative_prompt], #[sketch, first_prompt, first_negative_prompt],
 
17
  with gr.Blocks() as ui:
18
  with gr.Row():
19
  with gr.Column():
20
+ sketch=gr.Sketchpad(interactive=True, label='Sketch', type='numpy', image_mode="L", brush=gr.Brush()) #gr.Image(sources = 'upload', label='Sketch', type = 'pil')
21
  ser_image=gr.Image(type="pil")#, visible=False)
22
 
23
  with gr.Column():
 
52
  inputs=[sketch, first_prompt, second_prompt],
53
  label='Examples. Be concrete as much as possible.')
54
 
55
+ sketch.change(fn=get_img_from_sketchpad, inputs=sketch, outputs=ser_image, show_progress="full")
56
 
57
  improve_sketch.click(fn=controller.get_first_result,
58
  inputs=[ser_image, first_prompt, first_negative_prompt], #[sketch, first_prompt, first_negative_prompt],