Mark0047 commited on
Commit
3c74592
·
verified ·
1 Parent(s): 86f4f6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -3,13 +3,15 @@
3
  # gr.load("models/openai/whisper-large-v3-turbo").launch()
4
 
5
  import gradio as gr
6
-
7
  model = gr.load("models/openai/whisper-large-v3-turbo")
8
 
 
9
  # Define a function to process the output and extract only the transcription text
10
  def process_transcription(audio_input):
11
- result = model(audio_input)
12
- print(type(result))
 
13
  print(result)
14
  # Extract the transcription text directly
15
  transcription = result.text
 
3
  # gr.load("models/openai/whisper-large-v3-turbo").launch()
4
 
5
  import gradio as gr
6
+ from transformers import pipeline
7
  model = gr.load("models/openai/whisper-large-v3-turbo")
8
 
9
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo")
10
  # Define a function to process the output and extract only the transcription text
11
  def process_transcription(audio_input):
12
+
13
+ result = pipe(audio_input)
14
+ print(result["text"])
15
  print(result)
16
  # Extract the transcription text directly
17
  transcription = result.text