Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -267,21 +267,22 @@ with gr.Blocks(css=css) as demo:
|
|
267 |
outputs=[result],
|
268 |
api_name="run",
|
269 |
)
|
270 |
-
|
271 |
with gr.TabItem("Image to Image"):
|
272 |
with gr.Group():
|
273 |
with gr.Row():
|
274 |
with gr.Column():
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
|
|
|
|
283 |
with gr.Column():
|
284 |
-
img2img_output = gr.Gallery(label="Result", elem_id="gallery", show_label=False)
|
285 |
strength = gr.Slider(label="Img2Img Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.8)
|
286 |
with gr.Accordion("Advanced options", open=False):
|
287 |
with gr.Row():
|
@@ -322,7 +323,6 @@ with gr.Blocks(css=css) as demo:
|
|
322 |
step=0.1,
|
323 |
value=7.0,
|
324 |
)
|
325 |
-
img2img_run_button = gr.Button("Generate", scale=0)
|
326 |
|
327 |
img2img_use_negative_prompt.change(
|
328 |
fn=lambda x: gr.update(visible=x),
|
@@ -354,6 +354,5 @@ with gr.Blocks(css=css) as demo:
|
|
354 |
api_name="img2img_run",
|
355 |
)
|
356 |
|
357 |
-
|
358 |
if __name__ == "__main__":
|
359 |
demo.queue().launch()
|
|
|
267 |
outputs=[result],
|
268 |
api_name="run",
|
269 |
)
|
|
|
270 |
with gr.TabItem("Image to Image"):
|
271 |
with gr.Group():
|
272 |
with gr.Row():
|
273 |
with gr.Column():
|
274 |
+
with gr.Row():
|
275 |
+
img2img_prompt = gr.Text(
|
276 |
+
label="Prompt",
|
277 |
+
show_label=False,
|
278 |
+
max_lines=1,
|
279 |
+
placeholder="Enter your prompt",
|
280 |
+
container=False,
|
281 |
+
)
|
282 |
+
img2img_run_button = gr.Button("Generate", scale=0)
|
283 |
+
init_image = gr.Image(label="Input Image", type="pil", height=512, width=512)
|
284 |
with gr.Column():
|
285 |
+
img2img_output = gr.Gallery(label="Result", elem_id="gallery", show_label=False, height=512, width=512)
|
286 |
strength = gr.Slider(label="Img2Img Strength", minimum=0.0, maximum=1.0, step=0.01, value=0.8)
|
287 |
with gr.Accordion("Advanced options", open=False):
|
288 |
with gr.Row():
|
|
|
323 |
step=0.1,
|
324 |
value=7.0,
|
325 |
)
|
|
|
326 |
|
327 |
img2img_use_negative_prompt.change(
|
328 |
fn=lambda x: gr.update(visible=x),
|
|
|
354 |
api_name="img2img_run",
|
355 |
)
|
356 |
|
|
|
357 |
if __name__ == "__main__":
|
358 |
demo.queue().launch()
|