ayaanzaveri commited on
Commit
637be0f
1 Parent(s): 16d8794

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import whisper
3
+
4
+ def transcribe_video(file):
5
+ model = whisper.load_model("tiny")
6
+ result = model.transcribe(file.name)
7
+ return result["text"]
8
+
9
+ inputs = gr.inputs.Video()
10
+ outputs = gr.outputs.Textbox()
11
+
12
+ gr.Interface(fn=transcribe_video, inputs=inputs, outputs=outputs, title="Video Transcription", description="Transcribe speech from a video.").launch()