Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -39,8 +39,8 @@ load_dotenv()
|
|
39 |
MAX_INPUT_TEXT_LEN = int(os.environ.get("MAX_INPUT_TEXT_LEN", default=500))
|
40 |
|
41 |
# Dynamically read model files, exclude 'speakers.pth'
|
42 |
-
|
43 |
-
model_files = [f for f in os.listdir(os.path.join(os.getcwd(), 'checkpoints')) if f.endswith('.pth')]
|
44 |
# model_files.sort(key=lambda x: os.path.getmtime(os.path.join(os.getcwd(), x)), reverse=True)
|
45 |
|
46 |
speakers_path = "speakers.pth"
|
|
|
39 |
MAX_INPUT_TEXT_LEN = int(os.environ.get("MAX_INPUT_TEXT_LEN", default=500))
|
40 |
|
41 |
# Dynamically read model files, exclude 'speakers.pth'
|
42 |
+
model_files = [f for f in os.listdir(os.getcwd()) if f.endswith('.pth') and f != 'speakers.pth']
|
43 |
+
# model_files = [f for f in os.listdir(os.path.join(os.getcwd(), 'checkpoints')) if f.endswith('.pth')]
|
44 |
# model_files.sort(key=lambda x: os.path.getmtime(os.path.join(os.getcwd(), x)), reverse=True)
|
45 |
|
46 |
speakers_path = "speakers.pth"
|