Commit ·
90e042f
1
Parent(s): 865d24c
Added examples
Browse files- .gitignore +2 -1
- app.py +4 -0
- audio/ca.mp3 +0 -0
- audio/de.mp3 +0 -0
- audio/en.mp3 +0 -0
- audio/es.mp3 +0 -0
- audio/fr.mp3 +0 -0
- audio/it.mp3 +0 -0
- audio/nl.mp3 +0 -0
- audio/pt.mp3 +0 -0
- audio/uk.mp3 +0 -0
.gitignore
CHANGED
|
@@ -1 +1,2 @@
|
|
| 1 |
-
.vscode
|
|
|
|
|
|
| 1 |
+
.vscode
|
| 2 |
+
gradio_cached_examples
|
app.py
CHANGED
|
@@ -12,6 +12,8 @@ engines = {
|
|
| 12 |
default_lang: Model(default_lang)
|
| 13 |
}
|
| 14 |
|
|
|
|
|
|
|
| 15 |
|
| 16 |
|
| 17 |
def transcribe(audio, language: str):
|
|
@@ -38,4 +40,6 @@ gr.Interface(
|
|
| 38 |
outputs=[
|
| 39 |
"textbox"
|
| 40 |
],
|
|
|
|
|
|
|
| 41 |
live=True).launch()
|
|
|
|
| 12 |
default_lang: Model(default_lang)
|
| 13 |
}
|
| 14 |
|
| 15 |
+
examples = [[f"./audio/{lang}.mp3", lang] for lang in LANGUAGES]
|
| 16 |
+
|
| 17 |
|
| 18 |
|
| 19 |
def transcribe(audio, language: str):
|
|
|
|
| 40 |
outputs=[
|
| 41 |
"textbox"
|
| 42 |
],
|
| 43 |
+
examples = examples,
|
| 44 |
+
cache_examples=True,
|
| 45 |
live=True).launch()
|
audio/ca.mp3
ADDED
|
Binary file (58.6 kB). View file
|
|
|
audio/de.mp3
ADDED
|
Binary file (54.8 kB). View file
|
|
|
audio/en.mp3
ADDED
|
Binary file (50.9 kB). View file
|
|
|
audio/es.mp3
ADDED
|
Binary file (55.3 kB). View file
|
|
|
audio/fr.mp3
ADDED
|
Binary file (57.5 kB). View file
|
|
|
audio/it.mp3
ADDED
|
Binary file (62.6 kB). View file
|
|
|
audio/nl.mp3
ADDED
|
Binary file (68.8 kB). View file
|
|
|
audio/pt.mp3
ADDED
|
Binary file (48.8 kB). View file
|
|
|
audio/uk.mp3
ADDED
|
Binary file (67.8 kB). View file
|
|
|