it4xperts commited on
Commit
77f9756
1 Parent(s): d245193

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -51,6 +51,8 @@ def download_audio(url):
51
  yt = YouTube(url)
52
  audio_stream = yt.streams.filter(only_audio=True).first()
53
  with NamedTemporaryFile(delete=False) as tempfile:
 
 
54
  audio_stream.download(filename=tempfile.name)
55
  return tempfile.name
56
  except pytube_exceptions.PytubeError as e:
 
51
  yt = YouTube(url)
52
  audio_stream = yt.streams.filter(only_audio=True).first()
53
  with NamedTemporaryFile(delete=False) as tempfile:
54
+ # Your code to use the tempfile
55
+
56
  audio_stream.download(filename=tempfile.name)
57
  return tempfile.name
58
  except pytube_exceptions.PytubeError as e: