Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
import whisper
|
3 |
#from pytube import YouTube
|
4 |
from pytubefix import YouTube
|
5 |
-
from pytubefix.cli import on_progress
|
6 |
|
7 |
loaded_model = whisper.load_model("medium")
|
8 |
current_size = 'medium'
|
@@ -10,7 +10,8 @@ current_size = 'medium'
|
|
10 |
def inference(link):
|
11 |
#yt = YouTube(link)
|
12 |
#yt = YouTube(link, on_progress_callback=on_progress, use_po_token=True)
|
13 |
-
yt = YouTube(link,
|
|
|
14 |
#global audio_stream
|
15 |
#audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
|
16 |
#path = audio_stream.download()
|
|
|
2 |
import whisper
|
3 |
#from pytube import YouTube
|
4 |
from pytubefix import YouTube
|
5 |
+
#from pytubefix.cli import on_progress
|
6 |
|
7 |
loaded_model = whisper.load_model("medium")
|
8 |
current_size = 'medium'
|
|
|
10 |
def inference(link):
|
11 |
#yt = YouTube(link)
|
12 |
#yt = YouTube(link, on_progress_callback=on_progress, use_po_token=True)
|
13 |
+
yt = YouTube(link, use_po_token=True)
|
14 |
+
#yt = YouTube(link, on_progress_callback=on_progress)
|
15 |
#global audio_stream
|
16 |
#audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
|
17 |
#path = audio_stream.download()
|