pablocst commited on
Commit
c3243aa
1 Parent(s): fb111d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -26,7 +26,7 @@ choices = os.popen('tesseract --list-langs').read().split('\n')[1:-1]
26
 
27
 
28
  # 翻译模型选择
29
- def model_choice(src="en", trg="pt"):
30
  # https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-pt-en
31
  # https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-en-pt
32
  model_name = f"Helsinki-NLP/opus-mt-tc-big-{src}-{trg}" # 模型名称
@@ -123,7 +123,7 @@ def main():
123
  with gr.Row():
124
  inputs_lang = gr.CheckboxGroup(choices=["por", "eng"],
125
  type="value",
126
- value=['por'],
127
  label='language')
128
 
129
  with gr.Row():
 
26
 
27
 
28
  # 翻译模型选择
29
+ def model_choice(src=src, trg=trg):
30
  # https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-pt-en
31
  # https://huggingface.co/Helsinki-NLP/opus-mt-tc-big-en-pt
32
  model_name = f"Helsinki-NLP/opus-mt-tc-big-{src}-{trg}" # 模型名称
 
123
  with gr.Row():
124
  inputs_lang = gr.CheckboxGroup(choices=["por", "eng"],
125
  type="value",
126
+ value=['eng'],
127
  label='language')
128
 
129
  with gr.Row():