Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,13 +40,14 @@ def transcribe(audio):
|
|
40 |
device=device,
|
41 |
)
|
42 |
|
43 |
-
#
|
44 |
-
|
|
|
|
|
45 |
|
46 |
-
|
47 |
-
|
48 |
|
49 |
-
prediction = pipe(audio_np, attention_mask=attention_mask, past_key_values=past_key_values)["text"]
|
50 |
return prediction
|
51 |
|
52 |
gradio_app = gr.Interface(
|
|
|
40 |
device=device,
|
41 |
)
|
42 |
|
43 |
+
# prediction = pipe(audio_np)["text"]
|
44 |
+
|
45 |
+
ds = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
|
46 |
+
sample = ds[0]["audio"]
|
47 |
|
48 |
+
prediction = pipe(sample.copy(), batch_size=8)["text"]
|
49 |
+
print(prediction)
|
50 |
|
|
|
51 |
return prediction
|
52 |
|
53 |
gradio_app = gr.Interface(
|