Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -156,14 +156,14 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
|
156 |
|
157 |
with gr.Row():
|
158 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
159 |
-
|
160 |
-
|
161 |
|
162 |
with gr.Row():
|
163 |
image_output = gr.Image(type="pil", label="Image Output", format="png", show_share_button=False, elem_id="gallery")
|
164 |
with gr.Row():
|
165 |
-
|
166 |
-
|
167 |
|
168 |
gr.Examples(
|
169 |
examples = examples,
|
@@ -181,6 +181,7 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
|
181 |
image_button.click(flip_image, inputs=image_input, outputs=image_output, concurrency_limit=2)
|
182 |
|
183 |
app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
|
|
184 |
if __name__ == "__main__":
|
185 |
app.launch(show_api=False, share=False)
|
186 |
|
|
|
156 |
|
157 |
with gr.Row():
|
158 |
text_button = gr.Button("Run", variant='primary', elem_id="gen-button")
|
159 |
+
clear_prompt =gr.Button("Clear Prompt",variant="primary", elem_id="clear_button")
|
160 |
+
clear_prompt.click(lambda: (None), None, [text_prompt], queue=False, show_api=False)
|
161 |
|
162 |
with gr.Row():
|
163 |
image_output = gr.Image(type="pil", label="Image Output", format="png", show_share_button=False, elem_id="gallery")
|
164 |
with gr.Row():
|
165 |
+
clear_results = gr.Button(value="Clear Image", variant="primary", elem_id="clear_button")
|
166 |
+
clear_results.click(lambda: (None), None, [image_output], queue=False, show_api=False)
|
167 |
|
168 |
gr.Examples(
|
169 |
examples = examples,
|
|
|
181 |
image_button.click(flip_image, inputs=image_input, outputs=image_output, concurrency_limit=2)
|
182 |
|
183 |
app.queue(default_concurrency_limit=200, max_size=200) # <-- Sets up a queue with default parameters
|
184 |
+
|
185 |
if __name__ == "__main__":
|
186 |
app.launch(show_api=False, share=False)
|
187 |
|