Spaces:
Sleeping
Sleeping
Commit
•
af4a49e
1
Parent(s):
3c79427
Update src/main.py
Browse files- src/main.py +2 -1
src/main.py
CHANGED
@@ -100,10 +100,11 @@ def get_rvc_model(voice_model, is_webui):
|
|
100 |
for root, dirs, files in os.walk(model_dir):
|
101 |
# Iterate over the files in the current directory
|
102 |
for file in files:
|
103 |
-
# Check if the file has a .pth extension
|
104 |
if file.endswith('.pth'):
|
105 |
# Append the full path of the file to the list
|
106 |
rvc_model_filename = os.path.join(root, file)
|
|
|
|
|
107 |
|
108 |
if rvc_model_filename is None:
|
109 |
error_msg = f'No model file exists in {model_dir}.'
|
|
|
100 |
for root, dirs, files in os.walk(model_dir):
|
101 |
# Iterate over the files in the current directory
|
102 |
for file in files:
|
|
|
103 |
if file.endswith('.pth'):
|
104 |
# Append the full path of the file to the list
|
105 |
rvc_model_filename = os.path.join(root, file)
|
106 |
+
if file.endswith('.index'):
|
107 |
+
rvc_index_filename = file
|
108 |
|
109 |
if rvc_model_filename is None:
|
110 |
error_msg = f'No model file exists in {model_dir}.'
|