Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -32,11 +32,13 @@ from transformers import pipeline
|
|
32 |
modelo = pipeline("automatic-speech-recognition", model="openai/whisper-base")
|
33 |
|
34 |
def transcribe(audio):
|
35 |
-
|
36 |
-
|
37 |
|
|
|
38 |
gr.Interface(
|
39 |
fn=transcribe,
|
40 |
inputs=[gr.Audio(source="microphone", type="filepath")],
|
41 |
outputs=["textbox"]
|
42 |
-
).launch()
|
|
|
|
32 |
modelo = pipeline("automatic-speech-recognition", model="openai/whisper-base")
|
33 |
|
34 |
def transcribe(audio):
|
35 |
+
text = modelo(audio)["text"]
|
36 |
+
return text
|
37 |
|
38 |
+
# Criar a interface Gradio
|
39 |
gr.Interface(
|
40 |
fn=transcribe,
|
41 |
inputs=[gr.Audio(source="microphone", type="filepath")],
|
42 |
outputs=["textbox"]
|
43 |
+
).launch(share=True) # Adicionar o parΓ’metro share=True para criar um link pΓΊblico
|
44 |
+
|