SefyanKehail commited on
Commit
b13607d
·
1 Parent(s): 2317b1b

using model.pth and index.pth by default: fixed run()

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -109,10 +109,8 @@ def convert_now(audio_files, random_tag, converter):
109
 
110
  def run(
111
  audio_files,
112
- file_m,
113
  pitch_alg,
114
  pitch_lvl,
115
- file_index,
116
  index_inf,
117
  r_m_f,
118
  e_r,
@@ -124,22 +122,22 @@ def run(
124
  if isinstance(audio_files, str):
125
  audio_files = [audio_files]
126
 
127
- if file_m is None:
128
- file_m = default_model_path
129
- file_index = default_index_path
130
 
131
- if file_m is not None and file_m.endswith(".txt"):
132
- file_m, file_index = find_my_model(file_m, file_index)
133
- print(file_m, file_index)
134
 
135
  random_tag = "USER_"+str(random.randint(10000000, 99999999))
136
 
137
  converter.apply_conf(
138
  tag=random_tag,
139
- file_model=file_m,
140
  pitch_algo=pitch_alg,
141
  pitch_lvl=pitch_lvl,
142
- file_index=file_index,
143
  index_influence=index_inf,
144
  respiration_median_filtering=r_m_f,
145
  envelope_ratio=e_r,
 
109
 
110
  def run(
111
  audio_files,
 
112
  pitch_alg,
113
  pitch_lvl,
 
114
  index_inf,
115
  r_m_f,
116
  e_r,
 
122
  if isinstance(audio_files, str):
123
  audio_files = [audio_files]
124
 
125
+ # if file_m is None:
126
+ # file_m = default_model_path
127
+ # file_index = default_index_path
128
 
129
+ # if file_m is not None and file_m.endswith(".txt"):
130
+ # file_m, file_index = find_my_model(file_m, file_index)
131
+ # print(file_m, file_index)
132
 
133
  random_tag = "USER_"+str(random.randint(10000000, 99999999))
134
 
135
  converter.apply_conf(
136
  tag=random_tag,
137
+ file_model=default_model_path,
138
  pitch_algo=pitch_alg,
139
  pitch_lvl=pitch_lvl,
140
+ file_index=default_index_path,
141
  index_influence=index_inf,
142
  respiration_median_filtering=r_m_f,
143
  envelope_ratio=e_r,