Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,11 @@ LANG_CODES = {
|
|
12 |
"German":"de",
|
13 |
"Portugese":"pt",
|
14 |
"French":"fr"
|
|
|
|
|
|
|
|
|
|
|
15 |
}
|
16 |
|
17 |
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/m2m100_418M").to(device)
|
@@ -56,7 +61,13 @@ with gr.Blocks() as app:
|
|
56 |
|
57 |
Input your text to translate, a source language and target language, and desired number of return sequences!
|
58 |
|
59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
60 |
|
61 |
### Model and Data
|
62 |
This app uses Facebook/Meta AI's M2M100 418M param model for translation.
|
|
|
12 |
"German":"de",
|
13 |
"Portugese":"pt",
|
14 |
"French":"fr"
|
15 |
+
"Dutch":"nl"
|
16 |
+
"Chinese":"zh"
|
17 |
+
"Japanese":"ja"
|
18 |
+
"Korean":"ko"
|
19 |
+
"Russian":"ru"
|
20 |
}
|
21 |
|
22 |
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/m2m100_418M").to(device)
|
|
|
61 |
|
62 |
Input your text to translate, a source language and target language, and desired number of return sequences!
|
63 |
|
64 |
+
Return sequences is formally known as alternative translations.
|
65 |
+
If the main translation is not good for what tone you expect, you can increase return sequences and retranslate.
|
66 |
+
It will show a list of alternative translations, alongside the main translation.
|
67 |
+
|
68 |
+
Right now, this only supports 12 languages.
|
69 |
+
|
70 |
+
I will add more later! So stay tuned!
|
71 |
|
72 |
### Model and Data
|
73 |
This app uses Facebook/Meta AI's M2M100 418M param model for translation.
|