nijisakai commited on
Commit
4deb1ff
1 Parent(s): 3d93f92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -269,9 +269,22 @@ interface_file = gr.Interface(
269
  description=description,
270
  article=article,
271
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
272
  interface_yt = gr.Interface(
273
- predict_song_from_yt,
274
- extract_vocal_demucs,
275
  inputs=[
276
  gr.Textbox(
277
  label="Bilibili网址", info="请填写含有您喜欢歌曲的Bilibili网址,可直接填写相应的BV号"
 
269
  description=description,
270
  article=article,
271
  )
272
+
273
+ def combined_output(bilibili_url, start_time, end_time, speaker_choice, pitch_shift, f0_check, cluster_ratio, noise_scale, inference_method):
274
+ # 根据你之前提供的参数调用predict_song_from_yt
275
+ ai_with_instrumental, ai_vocal = predict_song_from_yt(bilibili_url, start_time, end_time, speaker_choice, pitch_shift, f0_check, cluster_ratio, noise_scale, inference_method)
276
+
277
+ # 假设extract_vocal_demucs需要B站URL,起始时间和结束时间作为输入
278
+ # 注意:你可能需要调整这一部分,以确保你为extract_vocal_demucs提供了正确的参数
279
+ vocal_wav, instrumental_wav = extract_vocal_demucs(bilibili_url, start_time, end_time)
280
+
281
+ return ai_with_instrumental, ai_vocal, vocal_wav, instrumental_wav
282
+
283
+
284
+
285
  interface_yt = gr.Interface(
286
+ # predict_song_from_yt,
287
+ combined_output,
288
  inputs=[
289
  gr.Textbox(
290
  label="Bilibili网址", info="请填写含有您喜欢歌曲的Bilibili网址,可直接填写相应的BV号"