HoneyTian commited on
Commit
7e1376c
1 Parent(s): f1ed46a
Files changed (2) hide show
  1. examples.py +1 -1
  2. main.py +7 -4
examples.py CHANGED
@@ -5,7 +5,7 @@
5
  examples = [
6
  [
7
  "Chinese",
8
- "csukuangfj/sherpa-onnx-paraformer-zh-2024-03-09",
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 = ["Chinese"]
76
 
77
- language_to_models = {
78
- "Chinese": ["None"]
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: