Mark0047 commited on
Commit
a1af285
·
verified ·
1 Parent(s): b55cef2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -1
app.py CHANGED
@@ -1,3 +1,23 @@
 
 
 
 
 
1
  import gradio as gr
2
 
3
- gr.load("models/openai/whisper-large-v3-turbo").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # import gradio as gr
2
+
3
+ # gr.load("models/openai/whisper-large-v3-turbo").launch()
4
+
5
+
6
  import gradio as gr
7
 
8
+ # Define a function to process the output and extract only the transcription text
9
+ def process_transcription(audio_input):
10
+ model = gr.Interface.load("models/openai/whisper-large-v3-turbo")
11
+ result = model(audio_input)
12
+
13
+ # Extract the transcription text directly
14
+ transcription = result["text"]
15
+ return transcription
16
+
17
+ # Launch the interface
18
+ gr.Interface(
19
+ fn=process_transcription,
20
+ inputs="audio",
21
+ outputs="text",
22
+ live=True,
23
+ ).launch()