Spaces:
Sleeping
Sleeping
Update ui/gradio_ui.py
Browse files- ui/gradio_ui.py +3 -2
ui/gradio_ui.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import gradio as gr
|
|
|
2 |
|
3 |
def ui(controller):#get_first_result,get_second_result): #controller):
|
4 |
with gr.Blocks() as ui:
|
@@ -37,7 +38,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
|
|
37 |
|
38 |
|
39 |
improve_sketch.click(fn=controller.get_first_result,
|
40 |
-
inputs=[sketch, first_prompt, first_negative_prompt],
|
41 |
outputs=improved_sketch_view)
|
42 |
|
43 |
result_button.click(fn=controller.get_second_result,
|
@@ -45,7 +46,7 @@ def ui(controller):#get_first_result,get_second_result): #controller):
|
|
45 |
outputs=result)
|
46 |
|
47 |
firts_prompt_helper.click(fn=controller.get_help_w_prompt,
|
48 |
-
inputs=[sketch],
|
49 |
outputs=first_prompt)
|
50 |
|
51 |
second_prompt_helper.click(fn=controller.get_help_w_prompt,
|
|
|
1 |
import gradio as gr
|
2 |
+
from PIL import Image
|
3 |
|
4 |
def ui(controller):#get_first_result,get_second_result): #controller):
|
5 |
with gr.Blocks() as ui:
|
|
|
38 |
|
39 |
|
40 |
improve_sketch.click(fn=controller.get_first_result,
|
41 |
+
inputs=[Image.fromarray(sketch), first_prompt, first_negative_prompt],
|
42 |
outputs=improved_sketch_view)
|
43 |
|
44 |
result_button.click(fn=controller.get_second_result,
|
|
|
46 |
outputs=result)
|
47 |
|
48 |
firts_prompt_helper.click(fn=controller.get_help_w_prompt,
|
49 |
+
inputs=[Image.fromarray(sketch)],
|
50 |
outputs=first_prompt)
|
51 |
|
52 |
second_prompt_helper.click(fn=controller.get_help_w_prompt,
|