qgyd2021 commited on
Commit
ec314ff
·
1 Parent(s): 57b5dd0

[update]add sent_tokenize

Browse files
Files changed (1) hide show
  1. main.py +6 -6
main.py CHANGED
@@ -23,11 +23,11 @@ def main():
23
  }
24
  }
25
 
26
- def fn_non_stream(src_text: str,
27
- src_lang: str,
28
- tgt_lang: str,
29
- model_name: str,
30
- ):
31
  model_group = model_dict.get(model_name)
32
  if model_group is None:
33
  for k in list(model_dict.keys()):
@@ -92,7 +92,7 @@ It was introduced in this [paper](https://arxiv.org/abs/2010.11125) and first re
92
  output = gr.Textbox(lines=4, label="Output Text")
93
 
94
  demo = gr.Interface(
95
- fn=fn_non_stream,
96
  inputs=inputs,
97
  outputs=output,
98
  examples=examples,
 
23
  }
24
  }
25
 
26
+ def multilingual_translation(src_text: str,
27
+ src_lang: str,
28
+ tgt_lang: str,
29
+ model_name: str,
30
+ ):
31
  model_group = model_dict.get(model_name)
32
  if model_group is None:
33
  for k in list(model_dict.keys()):
 
92
  output = gr.Textbox(lines=4, label="Output Text")
93
 
94
  demo = gr.Interface(
95
+ fn=multilingual_translation,
96
  inputs=inputs,
97
  outputs=output,
98
  examples=examples,