Spaces:
Sleeping
Sleeping
Etiquetas de salida
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import time
|
|
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 |
-
def greet(grabacion, modelo="
|
11 |
|
12 |
inicio = time.time()
|
13 |
|
@@ -16,7 +16,7 @@ def greet(grabacion, modelo="Base"):
|
|
16 |
y = y.astype(np.float32)
|
17 |
y /= np.max(np.abs(y))
|
18 |
|
19 |
-
if modelo == "
|
20 |
pipe = pipe_base
|
21 |
else:
|
22 |
pipe = pipe_small
|
@@ -33,5 +33,8 @@ demo = gr.Interface(fn=greet,
|
|
33 |
["base", "small"], label="Modelo", info="Modelos de Lara entrenados"
|
34 |
)
|
35 |
],
|
36 |
-
outputs=[
|
|
|
|
|
|
|
37 |
demo.launch()
|
|
|
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 |
+
def greet(grabacion, modelo="base"):
|
11 |
|
12 |
inicio = time.time()
|
13 |
|
|
|
16 |
y = y.astype(np.float32)
|
17 |
y /= np.max(np.abs(y))
|
18 |
|
19 |
+
if modelo == "base":
|
20 |
pipe = pipe_base
|
21 |
else:
|
22 |
pipe = pipe_small
|
|
|
33 |
["base", "small"], label="Modelo", info="Modelos de Lara entrenados"
|
34 |
)
|
35 |
],
|
36 |
+
outputs=[
|
37 |
+
gr.Text(label="Salida"),
|
38 |
+
gr.Number(label="Tiempo")
|
39 |
+
])
|
40 |
demo.launch()
|