Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,9 @@ import asyncio
|
|
4 |
import tempfile
|
5 |
import os
|
6 |
|
7 |
-
|
8 |
os.makedirs(custom_cache_path, exist_ok=True)
|
9 |
-
os.environ["GRADIO_TEMP_DIR"] =
|
10 |
|
11 |
# Get all available voices
|
12 |
async def get_voices():
|
@@ -80,4 +80,4 @@ async def create_demo():
|
|
80 |
# Run the application
|
81 |
if __name__ == "__main__":
|
82 |
demo = asyncio.run(create_demo())
|
83 |
-
demo.launch(allowed_paths=[
|
|
|
4 |
import tempfile
|
5 |
import os
|
6 |
|
7 |
+
custom_cache_path = "/home/usr/scripts/project/tts/"
|
8 |
os.makedirs(custom_cache_path, exist_ok=True)
|
9 |
+
os.environ["GRADIO_TEMP_DIR"] = custom_cache_path
|
10 |
|
11 |
# Get all available voices
|
12 |
async def get_voices():
|
|
|
80 |
# Run the application
|
81 |
if __name__ == "__main__":
|
82 |
demo = asyncio.run(create_demo())
|
83 |
+
demo.launch(allowed_paths=[custom_cache_path])
|