hugoiabd commited on
Commit
9c94255
1 Parent(s): ff97a84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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,11 +18,11 @@ 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,
@@ -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_1600 = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-base-lara-1600")
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_1600 = "base_2000:" + pipe_base_1600({"sampling_rate": sr, "raw": y})["text"]
22
 
23
  fin = time.time()
24
 
25
+ return result_base, result_small, result_base_1600, fin - inicio
26
  #return result_base, result_small, fin - inicio
27
 
28
  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 1600)"),
36
  gr.Number(label="Tiempo")
37
  ])
38
  demo.launch()