nickmuchi commited on
Commit
344ca22
1 Parent(s): c3f5a2a

Update functions.py

Browse files
Files changed (1) hide show
  1. functions.py +1 -4
functions.py CHANGED
@@ -301,11 +301,8 @@ def inference(link, upload, _asr_model):
301
 
302
  if validators.url(link):
303
 
304
- yt = YouTube(link)
305
  title = yt.title
306
-
307
- #Get audio file from YT
308
- audio_file = yt.streams.filter(only_audio=True)[0].download(filename="audio.mp4")
309
 
310
  if 'audio' not in st.session_state:
311
  st.session_state['audio'] = audio_file
 
301
 
302
  if validators.url(link):
303
 
304
+ yt = get_yt_audio(link)
305
  title = yt.title
 
 
 
306
 
307
  if 'audio' not in st.session_state:
308
  st.session_state['audio'] = audio_file