Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,12 +17,17 @@ def greet(grabacion):
|
|
17 |
y /= np.max(np.abs(y))
|
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,
|
@@ -31,8 +36,11 @@ demo = gr.Interface(fn=greet,
|
|
31 |
],
|
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()
|
|
|
17 |
y /= np.max(np.abs(y))
|
18 |
|
19 |
result_base = "base:" + pipe_base({"sampling_rate": sr, "raw": y})["text"]
|
20 |
+
fin_base = time.time()
|
21 |
+
|
22 |
result_small = "small:" + pipe_small({"sampling_rate": sr, "raw": y})["text"]
|
23 |
+
fin_small = time.time()
|
24 |
+
|
25 |
result_base_1600 = "base_2000:" + pipe_base_1600({"sampling_rate": sr, "raw": y})["text"]
|
26 |
+
fin_1600 = time.time()
|
27 |
|
28 |
fin = time.time()
|
29 |
|
30 |
+
return result_base, fin_base - inicio, result_small, fin_small - inicio, result_base_1600, fin_1600 - inicio, fin - inicio
|
31 |
#return result_base, result_small, fin - inicio
|
32 |
|
33 |
demo = gr.Interface(fn=greet,
|
|
|
36 |
],
|
37 |
outputs=[
|
38 |
gr.Text(label="Salida (Base)"),
|
39 |
+
gr.Number(label="Tiempo (Base)")
|
40 |
gr.Text(label="Salida (Small)"),
|
41 |
+
gr.Number(label="Tiempo (Small)")
|
42 |
gr.Text(label="Salida (Base 1600)"),
|
43 |
+
gr.Number(label="Tiempo (1600)")
|
44 |
gr.Number(label="Tiempo")
|
45 |
])
|
46 |
demo.launch()
|