Mohit0708 commited on
Commit
962c699
·
verified ·
1 Parent(s): 3e25238

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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
- with gr.Blocks(theme=gr.themes.Monochrome()) as app:
 
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
- app.launch()
 
 
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)