Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,7 @@
|
|
1 |
import os
|
2 |
-
try:
|
3 |
-
import torchaudio
|
4 |
-
except ImportError:
|
5 |
-
os.system("cd ./F5-TTS; pip install -e .")
|
6 |
|
|
|
|
|
7 |
|
8 |
import spaces
|
9 |
import logging
|
@@ -22,15 +20,17 @@ import numpy as np
|
|
22 |
|
23 |
from huggingface_hub import hf_hub_download, snapshot_download
|
24 |
|
25 |
-
model_path = "./ckpts/"
|
26 |
|
27 |
-
if
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
|
32 |
|
33 |
-
|
|
|
|
|
|
|
34 |
|
35 |
log = logging.getLogger()
|
36 |
|
|
|
1 |
import os
|
|
|
|
|
|
|
|
|
2 |
|
3 |
+
import sys
|
4 |
+
sys.path.insert(0, "./src/")
|
5 |
|
6 |
import spaces
|
7 |
import logging
|
|
|
20 |
|
21 |
from huggingface_hub import hf_hub_download, snapshot_download
|
22 |
|
|
|
23 |
|
24 |
+
if True:
|
25 |
+
model_path = "./ckpts/"
|
26 |
|
27 |
+
if not os.path.exists(model_path):
|
28 |
+
os.makedirs(model_path)
|
29 |
|
30 |
+
#file_path = hf_hub_download(repo_id="lshzhm/Video-to-Audio-and-Piano", filename=".", local_dir=model_path)
|
31 |
+
file_path = snapshot_download(repo_id="lshzhm/Video-to-Audio-and-Piano", local_dir=model_path)
|
32 |
+
|
33 |
+
print(f"Model saved at: {file_path}")
|
34 |
|
35 |
log = logging.getLogger()
|
36 |
|