mirari commited on
Commit
44e92a0
·
verified ·
1 Parent(s): 1595daf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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 urllib2
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 = urllib2.Request(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
 
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