Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -39,6 +39,7 @@ def predict(image, text):
|
|
39 |
return response
|
40 |
|
41 |
# Whisper STT optional model
|
|
|
42 |
def transcribe_audio(audio):
|
43 |
result = whisper.transcribe(audio, model="base")
|
44 |
return result["text"]
|
@@ -71,6 +72,7 @@ with demo:
|
|
71 |
gr.Examples(examples=[[image, prompt] for image, prompt in zip(example_images, example_prompts)], inputs=[image_input, text_input])
|
72 |
|
73 |
with gr.Tab("Audio Transcription (WIP) Prompt"):
|
|
|
74 |
audio_input = gr.Audio(label="Audio Input")
|
75 |
text_output = gr.Textbox(label="Transcribed Text")
|
76 |
gr.Button("Transcribe").click(transcribe_audio, inputs=audio_input, outputs=text_output)
|
|
|
39 |
return response
|
40 |
|
41 |
# Whisper STT optional model
|
42 |
+
@spaces.GPU
|
43 |
def transcribe_audio(audio):
|
44 |
result = whisper.transcribe(audio, model="base")
|
45 |
return result["text"]
|
|
|
72 |
gr.Examples(examples=[[image, prompt] for image, prompt in zip(example_images, example_prompts)], inputs=[image_input, text_input])
|
73 |
|
74 |
with gr.Tab("Audio Transcription (WIP) Prompt"):
|
75 |
+
gr.load("models/openai/whisper-large-v3")
|
76 |
audio_input = gr.Audio(label="Audio Input")
|
77 |
text_output = gr.Textbox(label="Transcribed Text")
|
78 |
gr.Button("Transcribe").click(transcribe_audio, inputs=audio_input, outputs=text_output)
|