Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,16 @@ from pytube import YouTube
|
|
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, use_po_token=True)
|
12 |
global audio_stream
|
|
|
6 |
|
7 |
loaded_model = whisper.load_model("medium")
|
8 |
current_size = 'medium'
|
9 |
+
|
10 |
+
|
11 |
def inference(link):
|
12 |
+
|
13 |
+
request_object = urllib2.Request(link)
|
14 |
+
method = ("POST", "GET")
|
15 |
+
request_object.get_method = lambda: method[0] #If method is set to POST
|
16 |
+
link = opener.open(req, data) #If method is set to POST
|
17 |
+
|
18 |
+
|
19 |
yt = YouTube(link)
|
20 |
#yt = YouTube(link, on_progress_callback=on_progress, use_po_token=True)
|
21 |
global audio_stream
|