Spaces:
Running
on
Zero
Running
on
Zero
Aboubacar OUATTARA - kaira
commited on
Commit
·
0b8d1b9
1
Parent(s):
06dc2fa
add examples
Browse files
app.py
CHANGED
@@ -53,17 +53,17 @@ def get_wav_files(directory):
|
|
53 |
|
54 |
def main():
|
55 |
# Get a list of all .wav files in the examples directory
|
56 |
-
|
57 |
|
58 |
# Setup Gradio interface
|
59 |
iface = gr.Interface(
|
60 |
fn=transcribe,
|
61 |
-
inputs=gr.Audio(type="filepath"),
|
62 |
outputs="text",
|
63 |
title="Bambara Automatic Speech Recognition",
|
64 |
description="Realtime demo for Bambara speech recognition based on a fine-tuning of the Whisper model.",
|
65 |
-
|
66 |
-
|
67 |
)
|
68 |
|
69 |
# Launch the interface
|
|
|
53 |
|
54 |
def main():
|
55 |
# Get a list of all .wav files in the examples directory
|
56 |
+
example_files = get_wav_files("./examples")
|
57 |
|
58 |
# Setup Gradio interface
|
59 |
iface = gr.Interface(
|
60 |
fn=transcribe,
|
61 |
+
inputs=gr.Audio(type="filepath", value=example_files[0]),
|
62 |
outputs="text",
|
63 |
title="Bambara Automatic Speech Recognition",
|
64 |
description="Realtime demo for Bambara speech recognition based on a fine-tuning of the Whisper model.",
|
65 |
+
examples=example_files,
|
66 |
+
cache_examples="lazy",
|
67 |
)
|
68 |
|
69 |
# Launch the interface
|