kk90ujhun commited on
Commit
ca46f4b
1 Parent(s): 22ee534

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,15 +5,15 @@ import requests
5
 
6
  pipe = pipeline(model="kk90ujhun/whisper-small-hi") # change to "your-username/the-name-you-picked"
7
 
8
- def transcribe(my_url):
9
- my_video = requests.get(my_url)
10
  my_audio = my_video.audio
11
  text = pipe(my_audio)["text"]
12
  return text
13
 
14
  iface = gr.Interface(
15
  fn=transcribe,
16
- inputs=gr.Textbox(default="default=https://eu.nv.instructuremedia.com/fetch/QkFoYkIxc0hhUVBBRmZvd2JDc0hKa0NUWXc9PS0tNGU1YzFmNGYxYTc4NDMxZGZmODMzZjMwMjZmYjA1ZWU2ZjI2MzUwZA.mp4"),
17
  outputs="text",
18
  title="Whisper Small Hindi",
19
  description="Realtime demo for Hindi speech recognition using a fine-tuned Whisper small model.",
 
5
 
6
  pipe = pipeline(model="kk90ujhun/whisper-small-hi") # change to "your-username/the-name-you-picked"
7
 
8
+ def transcribe(my_video):
9
+ # my_video = requests.get(my_url)
10
  my_audio = my_video.audio
11
  text = pipe(my_audio)["text"]
12
  return text
13
 
14
  iface = gr.Interface(
15
  fn=transcribe,
16
+ inputs=gr.video(),
17
  outputs="text",
18
  title="Whisper Small Hindi",
19
  description="Realtime demo for Hindi speech recognition using a fine-tuned Whisper small model.",