Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,11 +74,6 @@ def infer(prompt, negative_prompt, seed, randomize_seed, width, height, guidance
|
|
| 74 |
# Return image, seed, and the used prompts
|
| 75 |
return image, seed, f"Prompt used: {final_prompt}\nNegative prompt used: {full_negative_prompt}"
|
| 76 |
|
| 77 |
-
def download_image(image):
|
| 78 |
-
"""
|
| 79 |
-
Prepares the image for download as a PNG.
|
| 80 |
-
"""
|
| 81 |
-
return image
|
| 82 |
|
| 83 |
css = """
|
| 84 |
#col-container {
|
|
@@ -136,10 +131,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 136 |
gr.Markdown("""# Rainbow Media X""")
|
| 137 |
|
| 138 |
# Display result image at the top
|
| 139 |
-
result = gr.Image(label="Result", show_label=False, elem_id="result"
|
| 140 |
-
|
| 141 |
-
# Add a download button
|
| 142 |
-
download_button = gr.Button("Download as PNG", elem_id="download-button")
|
| 143 |
|
| 144 |
# Add a textbox to display the prompts used for generation
|
| 145 |
prompt_info = gr.Textbox(label="Prompts Used", lines=3, interactive=False, elem_id="prompt-info")
|
|
@@ -246,10 +238,4 @@ with gr.Blocks(css=css) as demo:
|
|
| 246 |
outputs=[result, seed, prompt_info]
|
| 247 |
)
|
| 248 |
|
| 249 |
-
|
| 250 |
-
download_image,
|
| 251 |
-
inputs=result,
|
| 252 |
-
outputs=gr.File(label="Download as PNG")
|
| 253 |
-
)
|
| 254 |
-
|
| 255 |
-
demo.queue().launch()
|
|
|
|
| 74 |
# Return image, seed, and the used prompts
|
| 75 |
return image, seed, f"Prompt used: {final_prompt}\nNegative prompt used: {full_negative_prompt}"
|
| 76 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
css = """
|
| 79 |
#col-container {
|
|
|
|
| 131 |
gr.Markdown("""# Rainbow Media X""")
|
| 132 |
|
| 133 |
# Display result image at the top
|
| 134 |
+
result = gr.Image(label="Result", show_label=False, elem_id="result")
|
|
|
|
|
|
|
|
|
|
| 135 |
|
| 136 |
# Add a textbox to display the prompts used for generation
|
| 137 |
prompt_info = gr.Textbox(label="Prompts Used", lines=3, interactive=False, elem_id="prompt-info")
|
|
|
|
| 238 |
outputs=[result, seed, prompt_info]
|
| 239 |
)
|
| 240 |
|
| 241 |
+
demo.queue().launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|