Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import whisper
|
|
3 |
from pytube import YouTube
|
4 |
#from pytubefix import YouTube
|
5 |
#from pytubefix.cli import on_progress
|
6 |
-
import
|
7 |
|
8 |
loaded_model = whisper.load_model("medium")
|
9 |
current_size = 'medium'
|
@@ -11,7 +11,7 @@ current_size = 'medium'
|
|
11 |
|
12 |
def inference(link):
|
13 |
|
14 |
-
request_object =
|
15 |
method = ("POST", "GET")
|
16 |
request_object.get_method = lambda: method[0] #If method is set to POST
|
17 |
link = opener.open(req, data) #If method is set to POST
|
|
|
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'
|
|
|
11 |
|
12 |
def inference(link):
|
13 |
|
14 |
+
request_object = urlopen(link)
|
15 |
method = ("POST", "GET")
|
16 |
request_object.get_method = lambda: method[0] #If method is set to POST
|
17 |
link = opener.open(req, data) #If method is set to POST
|