Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
"""
|
| 3 |
-
ROBOTSMALI
|
| 4 |
-
- Load: RNNT, CTC-BPE (Soloba) et CTC-char (QuartzNet) correctement
|
| 5 |
-
- Segmentation : protected ctc_segmentation -> fallback VAD
|
| 6 |
-
- Burn subtitles : réencodage (libx264) quand on applique un filtre subtitles
|
| 7 |
"""
|
| 8 |
|
| 9 |
import os
|
|
@@ -34,10 +31,10 @@ torch.manual_seed(1234)
|
|
| 34 |
MODELS = {
|
| 35 |
"Soloni V1 (RNNT)": ("RobotsMali/soloni-114m-tdt-ctc-v1", "rnnt"),
|
| 36 |
"Soloni V0 (RNNT)": ("RobotsMali/soloni-114m-tdt-ctc-v0", "rnnt"),
|
| 37 |
-
"Soloba V1 (CTC)": ("RobotsMali/soloba-ctc-0.6b-v1", "ctc"),
|
| 38 |
-
"Soloba V0 (CTC)": ("RobotsMali/soloba-ctc-0.6b-v0", "ctc"),
|
| 39 |
-
"QuartzNet V1 (CTC-char)": ("RobotsMali/stt-bm-quartznet15x5-v1", "ctc_char"),
|
| 40 |
-
"QuartzNet V0 (CTC-char)": ("RobotsMali/stt-bm-quartznet15x5-v0", "ctc_char"),
|
| 41 |
}
|
| 42 |
|
| 43 |
_cache = {}
|
|
@@ -349,8 +346,8 @@ def pipeline(video_input, model_name):
|
|
| 349 |
# ----------------------------
|
| 350 |
# INTERFACE GRADIO (optionnel)
|
| 351 |
# ----------------------------
|
| 352 |
-
with gr.Blocks(title="RobotsMali
|
| 353 |
-
gr.Markdown("
|
| 354 |
v = gr.Video(label="Vidéo à sous-titrer")
|
| 355 |
m = gr.Dropdown(list(MODELS.keys()), value="Soloba V1 (CTC)", label="Modèle ASR")
|
| 356 |
b = gr.Button("▶️ Générer")
|
|
|
|
| 1 |
# -*- coding: utf-8 -*-
|
| 2 |
"""
|
| 3 |
+
ROBOTSMALI — Sous-titrage Bambara
|
|
|
|
|
|
|
|
|
|
| 4 |
"""
|
| 5 |
|
| 6 |
import os
|
|
|
|
| 31 |
MODELS = {
|
| 32 |
"Soloni V1 (RNNT)": ("RobotsMali/soloni-114m-tdt-ctc-v1", "rnnt"),
|
| 33 |
"Soloni V0 (RNNT)": ("RobotsMali/soloni-114m-tdt-ctc-v0", "rnnt"),
|
| 34 |
+
"Soloba V1 (CTC)": ("RobotsMali/soloba-ctc-0.6b-v1", "ctc"),
|
| 35 |
+
"Soloba V0 (CTC)": ("RobotsMali/soloba-ctc-0.6b-v0", "ctc"),
|
| 36 |
+
"QuartzNet V1 (CTC-char)": ("RobotsMali/stt-bm-quartznet15x5-v1", "ctc_char"),
|
| 37 |
+
"QuartzNet V0 (CTC-char)": ("RobotsMali/stt-bm-quartznet15x5-v0", "ctc_char"),
|
| 38 |
}
|
| 39 |
|
| 40 |
_cache = {}
|
|
|
|
| 346 |
# ----------------------------
|
| 347 |
# INTERFACE GRADIO (optionnel)
|
| 348 |
# ----------------------------
|
| 349 |
+
with gr.Blocks(title="RobotsMali - Sous-titrage") as demo:
|
| 350 |
+
gr.Markdown(" RobotsMali — Sous-titrage")
|
| 351 |
v = gr.Video(label="Vidéo à sous-titrer")
|
| 352 |
m = gr.Dropdown(list(MODELS.keys()), value="Soloba V1 (CTC)", label="Modèle ASR")
|
| 353 |
b = gr.Button("▶️ Générer")
|