Spaces:
Running
on
Zero
Running
on
Zero
Commit
•
daf9b1e
1
Parent(s):
b7d4359
Update app.py
Browse files
app.py
CHANGED
@@ -63,10 +63,11 @@ def generate(image, prompt_user, progress=gr.Progress(track_tqdm=True)):
|
|
63 |
strength=1
|
64 |
).images[0]
|
65 |
|
|
|
66 |
width, height = out.size
|
67 |
half_width = width // 2
|
68 |
image_2 = out.crop((half_width, 0, width, height))
|
69 |
-
|
70 |
|
71 |
with gr.Blocks() as demo:
|
72 |
gr.Markdown("# Logo in Context")
|
@@ -88,7 +89,7 @@ with gr.Blocks() as demo:
|
|
88 |
|
89 |
with gr.Column():
|
90 |
output_image = gr.Image(label="Generated Application")
|
91 |
-
|
92 |
with gr.Row():
|
93 |
gr.Markdown("""
|
94 |
### Instructions:
|
@@ -103,7 +104,7 @@ with gr.Blocks() as demo:
|
|
103 |
generate_btn.click(
|
104 |
fn=generate,
|
105 |
inputs=[input_image, prompt_input],
|
106 |
-
outputs=[output_image]
|
107 |
)
|
108 |
|
109 |
# Launch the interface
|
|
|
63 |
strength=1
|
64 |
).images[0]
|
65 |
|
66 |
+
yield None, out
|
67 |
width, height = out.size
|
68 |
half_width = width // 2
|
69 |
image_2 = out.crop((half_width, 0, width, height))
|
70 |
+
yield image_2, out
|
71 |
|
72 |
with gr.Blocks() as demo:
|
73 |
gr.Markdown("# Logo in Context")
|
|
|
89 |
|
90 |
with gr.Column():
|
91 |
output_image = gr.Image(label="Generated Application")
|
92 |
+
output_side = gr.Image(label="Side by side")
|
93 |
with gr.Row():
|
94 |
gr.Markdown("""
|
95 |
### Instructions:
|
|
|
104 |
generate_btn.click(
|
105 |
fn=generate,
|
106 |
inputs=[input_image, prompt_input],
|
107 |
+
outputs=[output_image, output_side]
|
108 |
)
|
109 |
|
110 |
# Launch the interface
|