jbatista79 commited on
Commit
9794766
·
verified ·
1 Parent(s): 771c7a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -6,7 +6,7 @@ pipe = pipeline(model="jbatista79/whisper-small-eu") # change to "your-username
6
  def transcribe(audio):
7
  text = pipe(audio)["text"]
8
  return text
9
-
10
  iface = gr.Interface(
11
  fn=transcribe,
12
  # inputs=gr.Audio(source="microphone", type="filepath"),
@@ -15,5 +15,18 @@ iface = gr.Interface(
15
  title="Whisper Small Basque - Euskara (EU)",
16
  description="Realtime proof-of-concept demo for Basque speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-13",
17
  )
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  iface.launch(share=True)
 
6
  def transcribe(audio):
7
  text = pipe(audio)["text"]
8
  return text
9
+ '''
10
  iface = gr.Interface(
11
  fn=transcribe,
12
  # inputs=gr.Audio(source="microphone", type="filepath"),
 
15
  title="Whisper Small Basque - Euskara (EU)",
16
  description="Realtime proof-of-concept demo for Basque speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-13",
17
  )
18
+ '''
19
+
20
+ with gr.Blocks() as app:
21
+ with gr.Row():
22
+ with gr.Column():
23
+ gr.Image(value="WaWF-transparent-black-red-tm200x135-75dpi.png", width=100) # Adjust width as needed
24
+ with gr.Column():
25
+ gr.Markdown("## Whisper Small Basque - Euskara (EU)")
26
+ gr.Markdown("Realtime proof-of-concept demo for Basque speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-13")
27
+ with gr.Row():
28
+ audio_input = gr.Audio(sources=["microphone"], type="filepath")
29
+ output_text = gr.Textbox()
30
+ gr.Button("Transcribe").click(fn=transcribe, inputs=audio_input, outputs=output_text)
31
 
32
  iface.launch(share=True)