Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,20 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
import whisper
|
3 |
-
from pytube import YouTube
|
4 |
-
|
5 |
-
from
|
6 |
-
|
7 |
-
_default_clients[ "ANDROID"][ "context"]["client"]["clientVersion"] = "19.08.35"
|
8 |
-
_default_clients["IOS"]["context"]["client"]["clientVersion"] = "19.08.35"
|
9 |
-
_default_clients[ "ANDROID_EMBED"][ "context"][ "client"]["clientVersion"] = "19.08.35"
|
10 |
-
_default_clients[ "IOS_EMBED"][ "context"]["client"]["clientVersion"] = "19.08.35"
|
11 |
-
_default_clients["IOS_MUSIC"][ "context"]["client"]["clientVersion"] = "6.41"
|
12 |
-
_default_clients[ "ANDROID_MUSIC"] = _default_clients[ "ANDROID_CREATOR" ]
|
13 |
|
14 |
loaded_model = whisper.load_model("medium")
|
15 |
current_size = 'medium'
|
16 |
def inference(link):
|
17 |
-
yt = YouTube(link)
|
|
|
18 |
#global audio_stream
|
19 |
#audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
|
20 |
#path = audio_stream.download()
|
|
|
1 |
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'
|
9 |
def inference(link):
|
10 |
+
#yt = YouTube(link)
|
11 |
+
yt = YouTube(link, on_progress_callback=on_progress)
|
12 |
#global audio_stream
|
13 |
#audio_stream = yt.streams.filter(only_audio=True, file_extension='mp4').first()
|
14 |
#path = audio_stream.download()
|