Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -15,6 +15,13 @@ model_files = {
|
|
15 |
"s3fd.pth": "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth"
|
16 |
}
|
17 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
for filename, url in model_files.items():
|
19 |
file_path = os.path.join("checkpoints" if "pth" in filename else "face_detection", filename)
|
20 |
if not os.path.exists(file_path):
|
@@ -23,10 +30,7 @@ for filename, url in model_files.items():
|
|
23 |
with open(file_path, 'wb') as f:
|
24 |
f.write(r.content)
|
25 |
|
26 |
-
tts_model_path = "./xtts_v2"
|
27 |
|
28 |
-
# Initialize TTS model
|
29 |
-
tts = TTS(tts_model_path, gpu=True)
|
30 |
|
31 |
# Translation class
|
32 |
class translation:
|
|
|
15 |
"s3fd.pth": "https://www.adrianbulat.com/downloads/python-fan/s3fd-619a316812.pth"
|
16 |
}
|
17 |
|
18 |
+
|
19 |
+
tts_model_path = "./xtts_v2"
|
20 |
+
|
21 |
+
# Initialize TTS model
|
22 |
+
tts = TTS(tts_model_path, gpu=True)
|
23 |
+
|
24 |
+
|
25 |
for filename, url in model_files.items():
|
26 |
file_path = os.path.join("checkpoints" if "pth" in filename else "face_detection", filename)
|
27 |
if not os.path.exists(file_path):
|
|
|
30 |
with open(file_path, 'wb') as f:
|
31 |
f.write(r.content)
|
32 |
|
|
|
33 |
|
|
|
|
|
34 |
|
35 |
# Translation class
|
36 |
class translation:
|