Spaces:
Runtime error
Runtime error
rev all
Browse files
app.py
CHANGED
@@ -40,8 +40,7 @@ def infer(prompt, negative_prompt, guidance_scale=10, num_inference_steps=50):
|
|
40 |
|
41 |
return imgs
|
42 |
|
43 |
-
|
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."
|
@@ -54,8 +53,8 @@ examples=[
|
|
54 |
["Photo of cute puggieace dog as super hero, futuristic city in background, cinematic light, high dynamic range, insane intricate details, stunning cinema effects, aesthetic, masterpiece, trending on artstation, cartoon art", "", 12, 75],
|
55 |
]
|
56 |
|
57 |
-
base_14 = "https://huggingface.co/nielsgl/dreambooth-pug-ace-sd1.4/
|
58 |
-
base_21 = "https://huggingface.co/nielsgl/dreambooth-keras-pug-ace-sd2.1/
|
59 |
|
60 |
model_card_1 = f"""
|
61 |
# KerasCV Stable Diffusion in Diffusers 🧨🤗
|
@@ -176,7 +175,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"
|
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)
|
@@ -192,12 +191,6 @@ with gr.Blocks() as demo:
|
|
192 |
with gr.Column():
|
193 |
gr.Markdown(" ")
|
194 |
|
195 |
-
with gr.Row():
|
196 |
-
with gr.Column():
|
197 |
-
gr.Markdown("""# Hola
|
198 |
-

|
199 |
-
""")
|
200 |
-
|
201 |
demo.queue().launch()
|
202 |
|
203 |
|
@@ -213,4 +206,4 @@ demo.queue().launch()
|
|
213 |
# ], outputs=[output], title=title, description=description, examples=examples).queue()
|
214 |
|
215 |
|
216 |
-
# gr.TabbedInterface([card_interface, demo_interface], ["Model Card", "Demo 🤗"]).launch()
|
|
|
40 |
|
41 |
return imgs
|
42 |
|
43 |
+
output = gr.Gallery(label="Outputs").style(grid=(1,2))
|
|
|
44 |
|
45 |
# customize interface
|
46 |
title = "KerasCV Stable Diffusion Demo on images of Ace."
|
|
|
53 |
["Photo of cute puggieace dog as super hero, futuristic city in background, cinematic light, high dynamic range, insane intricate details, stunning cinema effects, aesthetic, masterpiece, trending on artstation, cartoon art", "", 12, 75],
|
54 |
]
|
55 |
|
56 |
+
base_14 = "https://huggingface.co/nielsgl/dreambooth-pug-ace-sd1.4/resolve/main/"
|
57 |
+
base_21 = "https://huggingface.co/nielsgl/dreambooth-keras-pug-ace-sd2.1/resolve/main/"
|
58 |
|
59 |
model_card_1 = f"""
|
60 |
# KerasCV Stable Diffusion in Diffusers 🧨🤗
|
|
|
175 |
prompt_steps = gr.Slider(label="Inference Steps",value=50)
|
176 |
prompt_btn = gr.Button("Generate")
|
177 |
with gr.Column():
|
178 |
+
output = gr.Gallery(label="Outputs").style(grid=(1,2))
|
179 |
prompt_btn.click(infer, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=[output])
|
180 |
with gr.Row():
|
181 |
gr.Examples(examples, inputs=[prompt_pos, prompt_neg, prompt_gs, prompt_steps], outputs=output, fn=infer, cache_examples=True)
|
|
|
191 |
with gr.Column():
|
192 |
gr.Markdown(" ")
|
193 |
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
demo.queue().launch()
|
195 |
|
196 |
|
|
|
206 |
# ], outputs=[output], title=title, description=description, examples=examples).queue()
|
207 |
|
208 |
|
209 |
+
# gr.TabbedInterface([card_interface, demo_interface], ["Model Card", "Demo 🤗"]).launch()
|