Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files- .gitignore +1 -0
- app.py +6 -3
.gitignore
CHANGED
@@ -167,3 +167,4 @@ cython_debug/
|
|
167 |
# Gradio
|
168 |
gradio_cached_examples
|
169 |
flagged
|
|
|
|
167 |
# Gradio
|
168 |
gradio_cached_examples
|
169 |
flagged
|
170 |
+
generated.jpg
|
app.py
CHANGED
@@ -120,7 +120,8 @@ with gr.Blocks(css=css) as demo:
|
|
120 |
submit_button = gr.Button('Submit', variant='primary')
|
121 |
download_button = gr.DownloadButton(label='Download Image', visible=False)
|
122 |
|
123 |
-
def save_image(img
|
|
|
124 |
img.save(filename)
|
125 |
return filename
|
126 |
|
@@ -129,9 +130,11 @@ with gr.Blocks(css=css) as demo:
|
|
129 |
inputs=[content_and_output, style_dropdown, style_strength_slider, output_quality],
|
130 |
outputs=[content_and_output]
|
131 |
).then(
|
132 |
-
fn=
|
|
|
|
|
133 |
).then(
|
134 |
-
fn=lambda: gr.update(visible=True
|
135 |
outputs=[download_button]
|
136 |
)
|
137 |
|
|
|
120 |
submit_button = gr.Button('Submit', variant='primary')
|
121 |
download_button = gr.DownloadButton(label='Download Image', visible=False)
|
122 |
|
123 |
+
def save_image(img):
|
124 |
+
filename = 'generated.jpg'
|
125 |
img.save(filename)
|
126 |
return filename
|
127 |
|
|
|
130 |
inputs=[content_and_output, style_dropdown, style_strength_slider, output_quality],
|
131 |
outputs=[content_and_output]
|
132 |
).then(
|
133 |
+
fn=save_image,
|
134 |
+
inputs=[content_and_output],
|
135 |
+
outputs=[download_button]
|
136 |
).then(
|
137 |
+
fn=lambda: gr.update(visible=True),
|
138 |
outputs=[download_button]
|
139 |
)
|
140 |
|