Spaces:
Sleeping
Sleeping
Gainward777
commited on
Update ui/gradio_ui.py
Browse files- ui/gradio_ui.py +11 -0
ui/gradio_ui.py
CHANGED
@@ -18,12 +18,14 @@ def ui(controller):#get_first_result,get_second_result): #controller):
|
|
18 |
with gr.Column():
|
19 |
first_prompt = gr.Textbox(label="Prompt", lines=3)
|
20 |
first_negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="sketch, lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
|
|
21 |
#controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=0.5, step=0.01, label="Contr")
|
22 |
improve_sketch = gr.Button(value="Improve Sketch", variant="primary")
|
23 |
|
24 |
with gr.Column():
|
25 |
second_prompt = gr.Textbox(label="Prompt", lines=3)
|
26 |
second_negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="disfigured, extra digit, fewer digits, cropped, worst quality, low quality")
|
|
|
27 |
result_button = gr.Button(value="Paint It", variant="primary")
|
28 |
|
29 |
|
@@ -35,5 +37,14 @@ def ui(controller):#get_first_result,get_second_result): #controller):
|
|
35 |
inputs=[improved_sketch_view, second_prompt, second_negative_prompt],
|
36 |
outputs=result)
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
ui.queue().launch(debug=True)
|
|
|
18 |
with gr.Column():
|
19 |
first_prompt = gr.Textbox(label="Prompt", lines=3)
|
20 |
first_negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="sketch, lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
21 |
+
firts_prompt_helper = gr.Button(value="Prompt Helper", variant="primary")
|
22 |
#controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=0.5, step=0.01, label="Contr")
|
23 |
improve_sketch = gr.Button(value="Improve Sketch", variant="primary")
|
24 |
|
25 |
with gr.Column():
|
26 |
second_prompt = gr.Textbox(label="Prompt", lines=3)
|
27 |
second_negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="disfigured, extra digit, fewer digits, cropped, worst quality, low quality")
|
28 |
+
second_prompt_helper = gr.Button(value="Prompt Helper", variant="primary")
|
29 |
result_button = gr.Button(value="Paint It", variant="primary")
|
30 |
|
31 |
|
|
|
37 |
inputs=[improved_sketch_view, second_prompt, second_negative_prompt],
|
38 |
outputs=result)
|
39 |
|
40 |
+
firts_prompt_helper.click(fn=controller.get_help_w_prompt,
|
41 |
+
inputs=[sketch],
|
42 |
+
outputs=first_prompt)
|
43 |
+
|
44 |
+
second_prompt_helper.click(fn=controller.get_help_w_prompt,
|
45 |
+
inputs=[improved_sketch_view],
|
46 |
+
outputs=first_prompt)
|
47 |
+
|
48 |
+
|
49 |
|
50 |
ui.queue().launch(debug=True)
|