Spaces:
Running
Running
Upload studio/studio_room/handlers.py with huggingface_hub
Browse files
studio/studio_room/handlers.py
CHANGED
|
@@ -300,6 +300,14 @@ def studio_chat(message: str, session: StudioSession | None, sel_start: float |
|
|
| 300 |
_append_chat(current, "studio_agent", action.reply)
|
| 301 |
|
| 302 |
preview = current.studio_room.last_preview_path or (_track_paths(current)[0] if _track_paths(current) else None)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 303 |
return (
|
| 304 |
"", # clear input
|
| 305 |
honeycomb_html(_waben(current), current.studio_room.analysis or None),
|
|
@@ -309,11 +317,7 @@ def studio_chat(message: str, session: StudioSession | None, sel_start: float |
|
|
| 309 |
preview,
|
| 310 |
status,
|
| 311 |
current,
|
| 312 |
-
|
| 313 |
-
"⬇ Download " + (action.export_format or "WAV").upper() if interactive_dl else "⬇ Export",
|
| 314 |
-
value=export_path,
|
| 315 |
-
interactive=interactive_dl,
|
| 316 |
-
),
|
| 317 |
library_choices(current),
|
| 318 |
library_choices(current),
|
| 319 |
)
|
|
|
|
| 300 |
_append_chat(current, "studio_agent", action.reply)
|
| 301 |
|
| 302 |
preview = current.studio_room.last_preview_path or (_track_paths(current)[0] if _track_paths(current) else None)
|
| 303 |
+
if interactive_dl and export_path:
|
| 304 |
+
dl_update = gr.DownloadButton(
|
| 305 |
+
"⬇ Download " + (action.export_format or "WAV").upper(),
|
| 306 |
+
value=export_path,
|
| 307 |
+
interactive=True,
|
| 308 |
+
)
|
| 309 |
+
else:
|
| 310 |
+
dl_update = gr.skip()
|
| 311 |
return (
|
| 312 |
"", # clear input
|
| 313 |
honeycomb_html(_waben(current), current.studio_room.analysis or None),
|
|
|
|
| 317 |
preview,
|
| 318 |
status,
|
| 319 |
current,
|
| 320 |
+
dl_update,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 321 |
library_choices(current),
|
| 322 |
library_choices(current),
|
| 323 |
)
|