Spaces:
Runtime error
Runtime error
Añadido modelo equipo 3
Browse files
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 |
-
|
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 |
-
|
28 |
-
|
29 |
-
|
30 |
|
31 |
fin = time.time()
|
32 |
|
33 |
-
return result_base, fin_base - inicio_base, result_small, fin_small - inicio_small,
|
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 (
|
46 |
-
gr.Number(label="Tiempo (
|
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()
|