Commit ·
637be0f
1
Parent(s): 16d8794
Create app.py
Browse files
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()
|