Spaces:
Sleeping
Sleeping
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, 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}" # 模型名称
|
|
|
26 |
|
27 |
|
28 |
# 翻译模型选择
|
29 |
+
def model_choice(src='trans_src', trg='trans_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}" # 模型名称
|