jbatista79 commited on
Commit
0cc54c9
1 Parent(s): 20a2ec3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -2
app.py CHANGED
@@ -6,7 +6,7 @@ pipe = pipeline(model="jbatista79/whisper-jrb-small-es") # change to "your-user
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,19 @@ iface = gr.Interface(
15
  title="Whisper Small Spanish - Español (ES)",
16
  description="Realtime proof-of-concept demo for Spanish speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-14",
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 Spanish - Español (ES)",
16
  description="Realtime proof-of-concept demo for Spanish speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-14",
17
  )
18
+ iface.launch(share=True)
19
+ '''
20
+ with gr.Blocks() as app:
21
+ with gr.Row():
22
+ with gr.Column():
23
+ gr.Image(value="https://huggingface.co/spaces/jbatista79/whisper-jrb-small-eu/blob/main/lion-face-outline-cut-hi-strategia-black-strategia01-300x77.png", width=300, show_label=False, show_download_button=False) # Adjust width as needed
24
+ with gr.Column():
25
+ gr.Markdown("## Whisper Small Spanish - Español (ES)")
26
+ gr.Markdown("Realtime proof-of-concept demo for Spanish speech recognition using a fine-tuned Whisper small model. Created by Josué R. Batista - 2024-01-14")
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
+ #app.launch(share=True)
33
+ app.launch()