hugoiabd commited on
Commit
c256705
1 Parent(s): 14f970c

Añadido modelo equipo 3

Browse files
Files changed (1) hide show
  1. app.py +8 -8
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_1600 = pipeline("automatic-speech-recognition", model="aitor-medrano/whisper-base-lara-1600")
10
 
11
  def greet(grabacion):
12
  inicio = time.time()
@@ -24,13 +24,13 @@ def greet(grabacion):
24
  result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
25
  fin_small = time.time()
26
 
27
- inicio_1600 = time.time()
28
- result_base_1600 = "base_2000:" + pipe_base_1600({"sampling_rate": sr, "raw": y})["text"]
29
- fin_1600 = time.time()
30
 
31
  fin = time.time()
32
 
33
- return result_base, fin_base - inicio_base, result_small, fin_small - inicio_small, result_base_1600, fin_1600 - inicio_1600, fin - inicio
34
  #return result_base, result_small, fin - inicio
35
 
36
  demo = gr.Interface(fn=greet,
@@ -42,8 +42,8 @@ demo = gr.Interface(fn=greet,
42
  gr.Number(label="Tiempo (Base)"),
43
  gr.Text(label="Salida (Small)"),
44
  gr.Number(label="Tiempo (Small)"),
45
- gr.Text(label="Salida (Base 1600)"),
46
- gr.Number(label="Tiempo (1600)"),
47
- gr.Number(label="Tiempo")
48
  ])
49
  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_hombres = pipeline("automatic-speech-recognition", model="IABDs8a/lara-hombres-equipo-3")
10
 
11
  def greet(grabacion):
12
  inicio = time.time()
 
24
  result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
25
  fin_small = time.time()
26
 
27
+ inicio_hombres = time.time()
28
+ result_hombres = "base_2000:" + pipe_hombres({"sampling_rate": sr, "raw": y})["text"]
29
+ fin_hombres = time.time()
30
 
31
  fin = time.time()
32
 
33
+ return result_base, fin_base - inicio_base, result_small, fin_small - inicio_small, result_hombres, fin_hombres - inicio_hombres, fin - inicio
34
  #return result_base, result_small, fin - inicio
35
 
36
  demo = gr.Interface(fn=greet,
 
42
  gr.Number(label="Tiempo (Base)"),
43
  gr.Text(label="Salida (Small)"),
44
  gr.Number(label="Tiempo (Small)"),
45
+ gr.Text(label="Salida (Hombres)"),
46
+ gr.Number(label="Tiempo (Hombres)"),
47
+ gr.Number(label="Tiempo total")
48
  ])
49
  demo.launch()