Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -41,7 +41,7 @@ def infer(prompt, negative_prompt, guidance_scale=10, num_inference_steps=50):
|
|
41 |
return imgs
|
42 |
|
43 |
# output = gr.Gallery(label="Outputs").style(grid=(1,2))
|
44 |
-
output = gr.Gallery(label="Outputs")#, columns=2, rows=1)
|
45 |
|
46 |
# customize interface
|
47 |
title = "KerasCV Stable Diffusion Demo on images of Ace."
|
@@ -176,7 +176,7 @@ with gr.Blocks() as demo:
|
|
176 |
prompt_steps = gr.Slider(label="Inference Steps",value=50)
|
177 |
prompt_btn = gr.Button("Generate")
|
178 |
with gr.Column():
|
179 |
-
output = gr.Gallery(label="Outputs")#.style(grid=(1,2))
|
180 |
prompt_btn.click(infer, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=[output])
|
181 |
with gr.Row():
|
182 |
gr.Examples(examples, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=output, fn=infer, cache_examples=True)
|
|
|
41 |
return imgs
|
42 |
|
43 |
# output = gr.Gallery(label="Outputs").style(grid=(1,2))
|
44 |
+
output = gr.Gallery(label="Outputs", rows=1, columns=4, object_fit="contain", height="auto")#, columns=2, rows=1)
|
45 |
|
46 |
# customize interface
|
47 |
title = "KerasCV Stable Diffusion Demo on images of Ace."
|
|
|
176 |
prompt_steps = gr.Slider(label="Inference Steps",value=50)
|
177 |
prompt_btn = gr.Button("Generate")
|
178 |
with gr.Column():
|
179 |
+
output = gr.Gallery(label="Outputs", object_fit="contain", height="auto")#.style(grid=(1,2))
|
180 |
prompt_btn.click(infer, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=[output])
|
181 |
with gr.Row():
|
182 |
gr.Examples(examples, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=output, fn=infer, cache_examples=True)
|