unitminer commited on
Commit
cb4fefd
·
1 Parent(s): e8bc81f

fix: trying to use gpu version of jax

Browse files
Files changed (1) hide show
  1. handler.py +4 -2
handler.py CHANGED
@@ -30,10 +30,12 @@ class EndpointHandler():
30
  max_filesize = 100.0
31
 
32
  if not ("https://" in yt_id):
33
- yt_id = 'https://youtu.be/' + yt_id
 
 
34
 
35
  try:
36
- yt = pytube.YouTube(yt_id)
37
  stream = yt.streams.filter(only_audio=True)[0]
38
  except KeyError:
39
  return {"error":"An error occurred while loading the YouTube video. Please try again."}
 
30
  max_filesize = 100.0
31
 
32
  if not ("https://" in yt_id):
33
+ yt_url = 'https://youtu.be/' + yt_id
34
+ else:
35
+ yt_url = yt_id
36
 
37
  try:
38
+ yt = pytube.YouTube(yt_url)
39
  stream = yt.streams.filter(only_audio=True)[0]
40
  except KeyError:
41
  return {"error":"An error occurred while loading the YouTube video. Please try again."}