Tlanextli commited on
Commit
3c06271
·
1 Parent(s): debe112

Delete app_ge.py

Browse files
Files changed (1) hide show
  1. app_ge.py +0 -22
app_ge.py DELETED
@@ -1,22 +0,0 @@
1
- import os
2
- import gradio as gr
3
- from transformers import pipeline
4
-
5
- pipeline = pipeline(task="automatic-speech-recognition", model="jonatasgrosman/wav2vec2-large-xlsr-53-german")
6
- #pipeline = pipeline(task="automatic-speech-recognition", model="openai/whisper-large")
7
-
8
- def transcribe(audio_path : str) -> str:
9
- transcription = pipeline(audio_path)
10
- return transcription["text"]
11
-
12
-
13
- demo = gr.Interface(
14
- fn=transcribe,
15
- #inputs="microphone",
16
- inputs=gr.inputs.Audio(label="Upload audio file", type="filepath"),
17
- outputs="text"
18
- )
19
-
20
-
21
- if __name__ == "__main__":
22
- demo.launch()