frankrobotics commited on
Commit
e8c3f18
·
verified ·
1 Parent(s): 1c51114

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -4,6 +4,10 @@ import asyncio
4
  import tempfile
5
  import os
6
 
 
 
 
 
7
  # Get all available voices
8
  async def get_voices():
9
  voices = await edge_tts.list_voices()
@@ -76,4 +80,4 @@ async def create_demo():
76
  # Run the application
77
  if __name__ == "__main__":
78
  demo = asyncio.run(create_demo())
79
- demo.launch(allowed_paths=["/tmp/gradio"])
 
4
  import tempfile
5
  import os
6
 
7
+ custom_path = "/home/usr/scripts/project/tts/"
8
+ os.makedirs(custom_cache_path, exist_ok=True)
9
+ os.environ["GRADIO_TEMP_DIR"] = custom_path
10
+
11
  # Get all available voices
12
  async def get_voices():
13
  voices = await edge_tts.list_voices()
 
80
  # Run the application
81
  if __name__ == "__main__":
82
  demo = asyncio.run(create_demo())
83
+ demo.launch(allowed_paths=[custom_path])