oelu commited on
Commit
d9b7894
·
verified ·
1 Parent(s): 82e271e

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import whisper
2
+ import gradio as gr
3
+ import os
4
+
5
+ os.system("apt-get update && apt-get install -y ffmpeg")
6
+
7
+ model = whisper.load_model("Flurin17/whisper-large-v3-turbo-swiss-german")
8
+
9
+ def transcribe(audio):
10
+ result = model.transcribe(audio, language="de")
11
+ return result["text"]
12
+
13
+ gr.Interface(fn=transcribe,
14
+ inputs=gr.Audio(source="upload", type="filepath"),
15
+ outputs="text",
16
+ title="Swiss German Whisper Legal",
17
+ description="Transkription von Schweizerdeutsch zu Hochdeutsch für juristische Zwecke").launch()