akshansh36 commited on
Commit
4a50348
1 Parent(s): 0bf605d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -24,6 +24,9 @@ import threading
24
 
25
  logging.getLogger("infer_rvc_python").setLevel(logging.ERROR)
26
 
 
 
 
27
  converter = BaseLoader(only_cpu=False, hubert_path=None, rmvpe_path=None)
28
 
29
  title = "<center><strong><font size='7'>Vodex AI</font></strong></center>"
@@ -260,8 +263,9 @@ def run(audio_files, file_m, file_index):
260
  result = apply_noisereduce(result)
261
 
262
  return result
 
263
  def model_conf():
264
- model_files = [f for f in os.listdir("models") if f.endswith(".pth")]
265
  return gr.Dropdown(
266
  label="Select Model File",
267
  choices=model_files,
@@ -270,7 +274,7 @@ def model_conf():
270
  )
271
 
272
  def index_conf():
273
- index_files = [f for f in os.listdir("models") if f.endswith(".index")]
274
  return gr.Dropdown(
275
  label="Select Index File",
276
  choices=index_files,
 
24
 
25
  logging.getLogger("infer_rvc_python").setLevel(logging.ERROR)
26
 
27
+ # Ensure the correct path to the models directory
28
+ model_dir = os.path.join(os.getcwd(), "Vodex-AI", "models")
29
+
30
  converter = BaseLoader(only_cpu=False, hubert_path=None, rmvpe_path=None)
31
 
32
  title = "<center><strong><font size='7'>Vodex AI</font></strong></center>"
 
263
  result = apply_noisereduce(result)
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(
270
  label="Select Model File",
271
  choices=model_files,
 
274
  )
275
 
276
  def index_conf():
277
+ index_files = [f for f in os.listdir(model_dir) if f.endswith(".index")]
278
  return gr.Dropdown(
279
  label="Select Index File",
280
  choices=index_files,