ArkanDash commited on
Commit
b4f6525
1 Parent(s): 1cb796d

fix(app): config error

Browse files
Files changed (3) hide show
  1. README.md +2 -2
  2. app-update.py +4 -2
  3. app.py +2 -2
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  title: Rvc Models New
3
- emoji: 🐢
4
- colorFrom: blue
5
  colorTo: blue
6
  sdk: gradio
7
  sdk_version: 3.29.0
 
1
  ---
2
  title: Rvc Models New
3
+ emoji: 🎤
4
+ colorFrom: purple
5
  colorTo: blue
6
  sdk: gradio
7
  sdk_version: 3.29.0
app-update.py CHANGED
@@ -137,11 +137,13 @@ def change_to_tts_mode(tts_mode):
137
  else:
138
  return gr.Audio.update(visible=True), gr.Textbox.update(visible=False), gr.Dropdown.update(visible=False)
139
 
 
140
  def change_audio_to_path_mode(audio_mode):
141
  if audio_mode:
142
  return gr.Audio.update(visible=False), gr.Textbox.update(visible=True)
143
  else:
144
  return gr.Audio.update(visible=True), gr.Textbox.update(visible=False)
 
145
 
146
  if __name__ == '__main__':
147
  load_hubert()
@@ -203,7 +205,7 @@ if __name__ == '__main__':
203
  vc_inst_preview = gr.Audio(label="Instrumental Preview")
204
  vc_audio_preview = gr.Audio(label="Audio Preview")
205
  with gr.Column():
206
- vc_audio_mode = gr.Checkbox(label="Use audio path", value=False)
207
  if config.files:
208
  vc_input = gr.Textbox(label="Input audio path")
209
  else:
@@ -242,7 +244,7 @@ if __name__ == '__main__':
242
  vc_combine = gr.Button("Combine",variant="primary")
243
  vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio, tts_mode, tts_text, tts_voice], [vc_output1, vc_output2])
244
  tts_mode.change(change_to_tts_mode, [tts_mode], [vc_input, tts_text, tts_voice])
245
- vc_audio_input(change_audio_to_path_mode, [vc_audio_mode])
246
  if config.files:
247
  vc_convert.click(cut_vocal_and_inst, vc_youtube, [vc_vocal_preview, vc_inst_preview, vc_audio_preview, vc_input])
248
  vc_combine.click(combine_vocal_and_inst, [vc_output2, vc_volume], vc_outputCombine)
 
137
  else:
138
  return gr.Audio.update(visible=True), gr.Textbox.update(visible=False), gr.Dropdown.update(visible=False)
139
 
140
+ '''
141
  def change_audio_to_path_mode(audio_mode):
142
  if audio_mode:
143
  return gr.Audio.update(visible=False), gr.Textbox.update(visible=True)
144
  else:
145
  return gr.Audio.update(visible=True), gr.Textbox.update(visible=False)
146
+ '''
147
 
148
  if __name__ == '__main__':
149
  load_hubert()
 
205
  vc_inst_preview = gr.Audio(label="Instrumental Preview")
206
  vc_audio_preview = gr.Audio(label="Audio Preview")
207
  with gr.Column():
208
+ # vc_audio_mode = gr.Checkbox(label="Use audio path", value=False)
209
  if config.files:
210
  vc_input = gr.Textbox(label="Input audio path")
211
  else:
 
244
  vc_combine = gr.Button("Combine",variant="primary")
245
  vc_submit.click(vc_fn, [vc_input, vc_transpose, vc_f0method, vc_index_ratio, tts_mode, tts_text, tts_voice], [vc_output1, vc_output2])
246
  tts_mode.change(change_to_tts_mode, [tts_mode], [vc_input, tts_text, tts_voice])
247
+ # vc_audio_input(change_audio_to_path_mode, [vc_audio_mode])
248
  if config.files:
249
  vc_convert.click(cut_vocal_and_inst, vc_youtube, [vc_vocal_preview, vc_inst_preview, vc_audio_preview, vc_input])
250
  vc_combine.click(combine_vocal_and_inst, [vc_output2, vc_volume], vc_outputCombine)
app.py CHANGED
@@ -84,8 +84,8 @@ def load_hubert():
84
  suffix="",
85
  )
86
  hubert_model = models[0]
87
- hubert_model = hubert_model.to(device)
88
- if is_half:
89
  hubert_model = hubert_model.half()
90
  else:
91
  hubert_model = hubert_model.float()
 
84
  suffix="",
85
  )
86
  hubert_model = models[0]
87
+ hubert_model = hubert_model.to(config.device)
88
+ if config.is_half:
89
  hubert_model = hubert_model.half()
90
  else:
91
  hubert_model = hubert_model.float()