hugoiabd commited on
Commit
ff97a84
1 Parent(s): dc6e65b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,7 +6,7 @@ import time
6
 
7
  pipe_base = pipeline("automatic-speech-recognition", model="aitor-medrano/lara-base-pushed")
8
  pipe_small = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-small-lara")
9
- #pipe_base_2000 = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-base-lara-2000")
10
 
11
  def greet(grabacion):
12
  inicio = time.time()
@@ -18,12 +18,12 @@ def greet(grabacion):
18
 
19
  result_base = "base:" + pipe_base({"sampling_rate": sr, "raw": y})["text"]
20
  result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
21
- #result_base_2000 = "base_2000:" + pipe_base_2000({"sampling_rate": sr, "raw": y})["text"]
22
 
23
  fin = time.time()
24
 
25
- #return result_base, result_small, result_base_2000, fin - inicio
26
- return result_base, result_small, fin - inicio
27
 
28
  demo = gr.Interface(fn=greet,
29
  inputs=[
@@ -32,7 +32,7 @@ demo = gr.Interface(fn=greet,
32
  outputs=[
33
  gr.Text(label="Salida (Base)"),
34
  gr.Text(label="Salida (Small)"),
35
- #gr.Text(label="Salida (Base 2000)"),
36
  gr.Number(label="Tiempo")
37
  ])
38
  demo.launch()
 
6
 
7
  pipe_base = pipeline("automatic-speech-recognition", model="aitor-medrano/lara-base-pushed")
8
  pipe_small = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-small-lara")
9
+ pipe_base_2000 = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-base-lara-2000")
10
 
11
  def greet(grabacion):
12
  inicio = time.time()
 
18
 
19
  result_base = "base:" + pipe_base({"sampling_rate": sr, "raw": y})["text"]
20
  result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
21
+ result_base_2000 = "base_2000:" + pipe_base_2000({"sampling_rate": sr, "raw": y})["text"]
22
 
23
  fin = time.time()
24
 
25
+ return result_base, result_small, result_base_2000, fin - inicio
26
+ #return result_base, result_small, fin - inicio
27
 
28
  demo = gr.Interface(fn=greet,
29
  inputs=[
 
32
  outputs=[
33
  gr.Text(label="Salida (Base)"),
34
  gr.Text(label="Salida (Small)"),
35
+ gr.Text(label="Salida (Base 2000)"),
36
  gr.Number(label="Tiempo")
37
  ])
38
  demo.launch()