Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -301,9 +301,8 @@ with gr.Blocks() as demo:
|
|
| 301 |
boxed_img, textual, json_str = process_image(image)
|
| 302 |
filepath = create_json_file(json_str)
|
| 303 |
|
| 304 |
-
#
|
| 305 |
-
|
| 306 |
-
download_update = gr.DownloadButton.update(value=filepath, interactive=True)
|
| 307 |
|
| 308 |
return boxed_img, textual, json_str, download_update
|
| 309 |
|
|
@@ -329,6 +328,5 @@ with gr.Blocks() as demo:
|
|
| 329 |
)
|
| 330 |
|
| 331 |
# The download_btn no longer needs its own click event.
|
| 332 |
-
# Clicking it after it has a 'value' will trigger the download.
|
| 333 |
|
| 334 |
demo.launch()
|
|
|
|
| 301 |
boxed_img, textual, json_str = process_image(image)
|
| 302 |
filepath = create_json_file(json_str)
|
| 303 |
|
| 304 |
+
# Use the legacy gr.update() for compatibility with older Gradio versions.
|
| 305 |
+
download_update = gr.update(value=filepath, interactive=True)
|
|
|
|
| 306 |
|
| 307 |
return boxed_img, textual, json_str, download_update
|
| 308 |
|
|
|
|
| 328 |
)
|
| 329 |
|
| 330 |
# The download_btn no longer needs its own click event.
|
|
|
|
| 331 |
|
| 332 |
demo.launch()
|