Spaces:
Sleeping
Sleeping
akshansh36
commited on
Commit
•
16c6fdd
1
Parent(s):
397d7c2
constructing full model paths inside run()
Browse files
app.py
CHANGED
@@ -229,13 +229,16 @@ def run(audio_files, file_m, file_index):
|
|
229 |
except Exception as e:
|
230 |
print(e)
|
231 |
|
|
|
|
|
|
|
|
|
232 |
if file_m is not None and file_m.endswith(".txt"):
|
233 |
file_m, file_index = find_my_model(file_m, file_index)
|
234 |
print(file_m, file_index)
|
235 |
|
236 |
random_tag = "USER_" + str(random.randint(10000000, 99999999))
|
237 |
|
238 |
-
|
239 |
pitch_alg = "rmvpe+"
|
240 |
pitch_lvl = 0
|
241 |
index_inf = 0.75
|
@@ -264,6 +267,7 @@ def run(audio_files, file_m, file_index):
|
|
264 |
|
265 |
return result
|
266 |
|
|
|
267 |
def model_conf():
|
268 |
model_files = [f for f in os.listdir(model_dir) if f.endswith(".pth")]
|
269 |
return gr.Dropdown(
|
|
|
229 |
except Exception as e:
|
230 |
print(e)
|
231 |
|
232 |
+
# Construct the full path to the model and index files
|
233 |
+
file_m = os.path.join(model_dir, file_m)
|
234 |
+
file_index = os.path.join(model_dir, file_index) if file_index else None
|
235 |
+
|
236 |
if file_m is not None and file_m.endswith(".txt"):
|
237 |
file_m, file_index = find_my_model(file_m, file_index)
|
238 |
print(file_m, file_index)
|
239 |
|
240 |
random_tag = "USER_" + str(random.randint(10000000, 99999999))
|
241 |
|
|
|
242 |
pitch_alg = "rmvpe+"
|
243 |
pitch_lvl = 0
|
244 |
index_inf = 0.75
|
|
|
267 |
|
268 |
return result
|
269 |
|
270 |
+
|
271 |
def model_conf():
|
272 |
model_files = [f for f in os.listdir(model_dir) if f.endswith(".pth")]
|
273 |
return gr.Dropdown(
|