Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def generate(prompt: str, num_images: int=5, guidance_scale=7.5):
|
|
34 |
|
35 |
with gr.Blocks() as demo:
|
36 |
gr.Markdown("# SPIN-Diffusion 1.0 Demo")
|
37 |
-
gr.Markdown("A self-play fine-tuned diffusion model from runwayml/stable-diffusion-v1-5, using winner images from the yuvalkirstain/pickapic_v2 dataset.")
|
38 |
with gr.Row():
|
39 |
prompt_input = gr.Textbox(label="Enter your prompt", placeholder="Type something...", lines=2)
|
40 |
generate_btn = gr.Button("Generate images")
|
@@ -42,6 +42,8 @@ with gr.Blocks() as demo:
|
|
42 |
num_images_input = gr.Number(label="Number of images", value=5, minimum=1, maximum=10, step=1)
|
43 |
gallery = gr.Gallery(label="Generated images", elem_id="gallery", columns=5, object_fit="contain")
|
44 |
|
|
|
|
|
45 |
# Define your example prompts
|
46 |
examples = [
|
47 |
["The Eiffel Tower at sunset"],
|
@@ -57,6 +59,4 @@ with gr.Blocks() as demo:
|
|
57 |
|
58 |
generate_btn.click(fn=generate, inputs=[prompt_input, num_images_input, guidance_scale], outputs=gallery)
|
59 |
|
60 |
-
gr.Markdown("If a generated image appears entirely black, it has been filtered out by the NSFW safety checker. Please try generating additional images.")
|
61 |
-
|
62 |
demo.queue().launch()
|
|
|
34 |
|
35 |
with gr.Blocks() as demo:
|
36 |
gr.Markdown("# SPIN-Diffusion 1.0 Demo")
|
37 |
+
gr.Markdown("A **self-play** fine-tuned diffusion model from [runwayml/stable-diffusion-v1-5](https://huggingface.co/runwayml/stable-diffusion-v1-5), using winner images from the [yuvalkirstain/pickapic_v2](https://huggingface.co/datasets/yuvalkirstain/pickapic_v2) dataset.")
|
38 |
with gr.Row():
|
39 |
prompt_input = gr.Textbox(label="Enter your prompt", placeholder="Type something...", lines=2)
|
40 |
generate_btn = gr.Button("Generate images")
|
|
|
42 |
num_images_input = gr.Number(label="Number of images", value=5, minimum=1, maximum=10, step=1)
|
43 |
gallery = gr.Gallery(label="Generated images", elem_id="gallery", columns=5, object_fit="contain")
|
44 |
|
45 |
+
gr.Markdown("```If a generated image appears entirely black, it has been filtered out by the NSFW safety checker. Please try generating additional images.```")
|
46 |
+
|
47 |
# Define your example prompts
|
48 |
examples = [
|
49 |
["The Eiffel Tower at sunset"],
|
|
|
59 |
|
60 |
generate_btn.click(fn=generate, inputs=[prompt_input, num_images_input, guidance_scale], outputs=gallery)
|
61 |
|
|
|
|
|
62 |
demo.queue().launch()
|