Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -20,7 +20,8 @@ def generate_audio(text_prompt, duration, guidance):
|
|
| 20 |
# Diffusers outputs audio at 16000Hz sampling rate
|
| 21 |
return (16000, audio)
|
| 22 |
|
| 23 |
-
|
|
|
|
| 24 |
gr.Markdown("# 🎬 The Foley Artist AI")
|
| 25 |
gr.Markdown("Generate high-fidelity sound effects from text descriptions.")
|
| 26 |
|
|
@@ -40,4 +41,5 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as app:
|
|
| 40 |
outputs=[audio_output]
|
| 41 |
)
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
| 20 |
# Diffusers outputs audio at 16000Hz sampling rate
|
| 21 |
return (16000, audio)
|
| 22 |
|
| 23 |
+
# FIX 1: Removed theme from Blocks()
|
| 24 |
+
with gr.Blocks() as app:
|
| 25 |
gr.Markdown("# 🎬 The Foley Artist AI")
|
| 26 |
gr.Markdown("Generate high-fidelity sound effects from text descriptions.")
|
| 27 |
|
|
|
|
| 41 |
outputs=[audio_output]
|
| 42 |
)
|
| 43 |
|
| 44 |
+
# FIX 2: Added theme here and turned off SSR mode to prevent the asyncio crash
|
| 45 |
+
app.launch(theme=gr.themes.Monochrome(), ssr_mode=False)
|