kevinwang676 commited on
Commit
7396cb8
1 Parent(s): 5014479

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -99,7 +99,7 @@ def download_youtube_clip(
99
  end_time,
100
  output_filename,
101
  num_attempts=5,
102
- url_base="",
103
  quiet=False,
104
  force=False,
105
  ):
@@ -184,7 +184,7 @@ def predict_song_from_yt(
184
  end,
185
  "track.wav",
186
  force=True,
187
- url_base="",
188
  )
189
  vox_wav, inst_wav = extract_vocal_demucs(demucs_model, original_track_filepath)
190
  if transpose != 0:
@@ -205,7 +205,6 @@ def predict_song_from_yt(
205
  full_song = inst_wav + np.expand_dims(cloned_vox, 1)
206
  return (model.target_sample, full_song), (model.target_sample, cloned_vox)
207
 
208
-
209
  SPACE_ID = "nateraw/voice-cloning"
210
  description = f"""
211
 
 
99
  end_time,
100
  output_filename,
101
  num_attempts=5,
102
+ url_base="https://www.youtube.com/watch?v=",
103
  quiet=False,
104
  force=False,
105
  ):
 
184
  end,
185
  "track.wav",
186
  force=True,
187
+ url_base="" if ytid_or_url.startswith("http") else "https://www.youtube.com/watch?v=",
188
  )
189
  vox_wav, inst_wav = extract_vocal_demucs(demucs_model, original_track_filepath)
190
  if transpose != 0:
 
205
  full_song = inst_wav + np.expand_dims(cloned_vox, 1)
206
  return (model.target_sample, full_song), (model.target_sample, cloned_vox)
207
 
 
208
  SPACE_ID = "nateraw/voice-cloning"
209
  description = f"""
210