Gainward777 commited on
Commit
8f6e7d9
·
verified ·
1 Parent(s): 1e32deb

Update ui/gradio_ui.py

Browse files
Files changed (1) hide show
  1. ui/gradio_ui.py +3 -2
ui/gradio_ui.py CHANGED
@@ -6,7 +6,8 @@ import numpy as np
6
  SER_SKETCH=Image.fromarray(np.zeros((1024,1024)))
7
 
8
  def get_img_from_sketchpad(img):
9
- return Image.fromarray(img["composite"])
 
10
 
11
  def set_ser_sketch(img):
12
  global SER_SKETCH
@@ -47,7 +48,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
47
  inputs=[sketch, first_prompt, second_prompt],
48
  label='Examples. Be concrete as much as possible.')
49
 
50
- sketch.input(get_img_from_sketchpad, outputs=set_ser_sketch, inputs=sketch, show_progress="hidden")
51
 
52
  improve_sketch.click(fn=controller.get_first_result,
53
  inputs=[SER_SKETCH, first_prompt, first_negative_prompt], #[sketch, first_prompt, first_negative_prompt],
 
6
  SER_SKETCH=Image.fromarray(np.zeros((1024,1024)))
7
 
8
  def get_img_from_sketchpad(img):
9
+ global SER_SKETCH
10
+ SER_SKETCH=Image.fromarray(img["composite"])
11
 
12
  def set_ser_sketch(img):
13
  global SER_SKETCH
 
48
  inputs=[sketch, first_prompt, second_prompt],
49
  label='Examples. Be concrete as much as possible.')
50
 
51
+ sketch.input(fn=get_img_from_sketchpad, inputs=sketch, show_progress="hidden")
52
 
53
  improve_sketch.click(fn=controller.get_first_result,
54
  inputs=[SER_SKETCH, first_prompt, first_negative_prompt], #[sketch, first_prompt, first_negative_prompt],