Gainward777 commited on
Commit
9f61c1e
1 Parent(s): 3794395

Update ui/gradio_ui.py

Browse files
Files changed (1) hide show
  1. ui/gradio_ui.py +12 -6
ui/gradio_ui.py CHANGED
@@ -5,21 +5,27 @@ def ui(controller):#get_first_result,get_second_result): #controller):
5
  with gr.Row():
6
  with gr.Column():
7
  sketch=gr.Image(sources = 'upload', label='Model image', type = 'pil')
 
 
 
 
 
 
 
 
 
 
 
8
  first_prompt = gr.Textbox(label="Prompt", lines=3)
9
  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")
10
  #controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=0.5, step=0.01, label="Contr")
11
  improve_sketch = gr.Button(value="Improve Sketch", variant="primary")
12
- with gr.Column():
13
- improved_sketch_view = gr.Image(type="pil", label="Improved Sketch")
14
 
15
-
16
-
17
- #with gr.Row():
18
  with gr.Column():
19
- result=gr.Image(type="pil", label="Improved Sketch")
20
  second_prompt = gr.Textbox(label="Prompt", lines=3)
21
  second_negative_prompt = gr.Textbox(label="Negative prompt", lines=3, value="disfigured, extra digit, fewer digits, cropped, worst quality, low quality")
22
  result_button = gr.Button(value="Paint It", variant="primary")
 
23
 
24
  improve_sketch.click(fn=controller.get_first_result,
25
  inputs=[sketch, first_prompt, first_negative_prompt],
 
5
  with gr.Row():
6
  with gr.Column():
7
  sketch=gr.Image(sources = 'upload', label='Model image', type = 'pil')
8
+
9
+ with gr.Column():
10
+ improved_sketch_view = gr.Image(type="pil", label="Improved Sketch")
11
+
12
+ #with gr.Row():
13
+ with gr.Column():
14
+ result=gr.Image(type="pil", label="Improved Sketch")
15
+
16
+
17
+ with gr.Row():
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
 
30
  improve_sketch.click(fn=controller.get_first_result,
31
  inputs=[sketch, first_prompt, first_negative_prompt],