Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,17 +3,12 @@ import whisper
|
|
| 3 |
from pytube import YouTube
|
| 4 |
#from pytubefix import YouTube
|
| 5 |
#from pytubefix.cli import on_progress
|
| 6 |
-
from urllib.request import urlopen
|
| 7 |
|
| 8 |
loaded_model = whisper.load_model("medium")
|
| 9 |
current_size = 'medium'
|
| 10 |
|
| 11 |
|
| 12 |
def inference(link):
|
| 13 |
-
|
| 14 |
-
link = urlopen(link).read()
|
| 15 |
-
|
| 16 |
-
|
| 17 |
yt = YouTube(link)
|
| 18 |
#yt = YouTube(link, on_progress_callback=on_progress, use_po_token=True)
|
| 19 |
global audio_stream
|
|
|
|
| 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 |
|
| 10 |
|
| 11 |
def inference(link):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
yt = YouTube(link)
|
| 13 |
#yt = YouTube(link, on_progress_callback=on_progress, use_po_token=True)
|
| 14 |
global audio_stream
|