Spaces:
Running on Zero
Running on Zero
Commit ·
d9929fb
1
Parent(s): c06e566
fix: allow Gradio to serve /tmp files so waveform audio loads (403 fix)
Browse filesGradio 5 on HF Spaces blocks file serving from outside its own managed
temp dir by default. WAV files written to /tmp/tmpXXX/... returned 403
when the waveform iframe fetched them via /gradio_api/file=...
Fix: pass allowed_paths=["/tmp"] to demo.launch() so Gradio serves any
path under /tmp, resolving the 403 and unblocking the canvas waveform.
app.py
CHANGED
|
@@ -2304,4 +2304,4 @@ with gr.Blocks(title="Generate Audio for Video", css=_SLOT_CSS, js=_GLOBAL_JS) a
|
|
| 2304 |
hf_video.change(fn=_sync, inputs=[hf_video], outputs=[taro_video, mma_video])
|
| 2305 |
|
| 2306 |
print("[startup] app.py fully loaded — regen handlers registered, SSR disabled")
|
| 2307 |
-
demo.queue(max_size=10).launch(ssr_mode=False, height=900)
|
|
|
|
| 2304 |
hf_video.change(fn=_sync, inputs=[hf_video], outputs=[taro_video, mma_video])
|
| 2305 |
|
| 2306 |
print("[startup] app.py fully loaded — regen handlers registered, SSR disabled")
|
| 2307 |
+
demo.queue(max_size=10).launch(ssr_mode=False, height=900, allowed_paths=["/tmp"])
|