Spaces:
Running
Running
Update app.py
Browse files
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=
|
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=['
|
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():
|