Spaces:
Running
on
Zero
Running
on
Zero
tori29umai
commited on
Commit
•
3ba7a3a
1
Parent(s):
2421eec
app.py
Browse files
app.py
CHANGED
@@ -113,14 +113,10 @@ class Img2Img:
|
|
113 |
with gr.Row():
|
114 |
with gr.Column():
|
115 |
self.input_image_path = gr.Image(label="input_image", type='filepath')
|
116 |
-
self.line_image = gr.Image(label="line_image", type='pil')
|
117 |
self.prompt = gr.Textbox(label="prompt", lines=3)
|
118 |
self.negative_prompt = gr.Textbox(label="negative_prompt", lines=3, value="lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
119 |
-
|
120 |
prompt_analysis_button = gr.Button("prompt_analysis")
|
121 |
-
|
122 |
-
self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="controlnet_scale")
|
123 |
-
|
124 |
generate_button = gr.Button("generate")
|
125 |
with gr.Column():
|
126 |
self.output_image = gr.Image(type="pil", label="output_image")
|
@@ -131,10 +127,6 @@ class Img2Img:
|
|
131 |
outputs=self.prompt
|
132 |
)
|
133 |
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
generate_button.click(
|
139 |
fn=predict,
|
140 |
inputs=[self.input_image_path, self.prompt, self.negative_prompt, self.controlnet_scale],
|
@@ -143,6 +135,5 @@ class Img2Img:
|
|
143 |
return demo
|
144 |
|
145 |
|
146 |
-
|
147 |
img2img = Img2Img()
|
148 |
img2img.demo.launch(share=True)
|
|
|
113 |
with gr.Row():
|
114 |
with gr.Column():
|
115 |
self.input_image_path = gr.Image(label="input_image", type='filepath')
|
|
|
116 |
self.prompt = gr.Textbox(label="prompt", lines=3)
|
117 |
self.negative_prompt = gr.Textbox(label="negative_prompt", lines=3, value="lowres, error, extra digit, fewer digits, cropped, worst quality,low quality, normal quality, jpeg artifacts, blurry")
|
|
|
118 |
prompt_analysis_button = gr.Button("prompt_analysis")
|
119 |
+
self.controlnet_scale = gr.Slider(minimum=0.5, maximum=1.25, value=1.0, step=0.01, label="controlnet_scale")
|
|
|
|
|
120 |
generate_button = gr.Button("generate")
|
121 |
with gr.Column():
|
122 |
self.output_image = gr.Image(type="pil", label="output_image")
|
|
|
127 |
outputs=self.prompt
|
128 |
)
|
129 |
|
|
|
|
|
|
|
|
|
130 |
generate_button.click(
|
131 |
fn=predict,
|
132 |
inputs=[self.input_image_path, self.prompt, self.negative_prompt, self.controlnet_scale],
|
|
|
135 |
return demo
|
136 |
|
137 |
|
|
|
138 |
img2img = Img2Img()
|
139 |
img2img.demo.launch(share=True)
|