Spaces:
Running
Running
update
Browse files- examples.py +1 -1
- main.py +7 -4
examples.py
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
examples = [
|
6 |
[
|
7 |
"Chinese",
|
8 |
-
"csukuangfj/
|
9 |
"greedy_search",
|
10 |
4,
|
11 |
"Yes",
|
|
|
5 |
examples = [
|
6 |
[
|
7 |
"Chinese",
|
8 |
+
"csukuangfj/wenet-chinese-model",
|
9 |
"greedy_search",
|
10 |
4,
|
11 |
"Yes",
|
main.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
#!/usr/bin/python3
|
2 |
# -*- coding: utf-8 -*-
|
3 |
import argparse
|
|
|
4 |
import platform
|
5 |
|
6 |
import gradio as gr
|
@@ -72,11 +73,13 @@ css = """
|
|
72 |
def main():
|
73 |
title = "# Automatic Speech Recognition with Next-gen Kaldi"
|
74 |
|
75 |
-
language_choices =
|
76 |
|
77 |
-
language_to_models =
|
78 |
-
|
79 |
-
|
|
|
|
|
80 |
|
81 |
# blocks
|
82 |
with gr.Blocks(css=css) as blocks:
|
|
|
1 |
#!/usr/bin/python3
|
2 |
# -*- coding: utf-8 -*-
|
3 |
import argparse
|
4 |
+
from collections import defaultdict
|
5 |
import platform
|
6 |
|
7 |
import gradio as gr
|
|
|
73 |
def main():
|
74 |
title = "# Automatic Speech Recognition with Next-gen Kaldi"
|
75 |
|
76 |
+
language_choices = list(model_map.keys())
|
77 |
|
78 |
+
language_to_models = defaultdict(list)
|
79 |
+
for k, v in model_map.items():
|
80 |
+
for m in v:
|
81 |
+
repo_id = m["repo_id"]
|
82 |
+
language_to_models[k].append(repo_id)
|
83 |
|
84 |
# blocks
|
85 |
with gr.Blocks(css=css) as blocks:
|