p
commited on
Commit
·
3fce624
1
Parent(s):
c069c11
back m2m100_1.2B due to memory litmit
Browse files
app.py
CHANGED
@@ -1,17 +1,17 @@
|
|
1 |
-
# Based on example code of https://huggingface.co/facebook/
|
2 |
|
3 |
|
4 |
import gradio as gr
|
5 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
6 |
|
7 |
model = M2M100ForConditionalGeneration.from_pretrained(
|
8 |
-
"facebook/
|
9 |
|
10 |
-
tokenizer = M2M100Tokenizer.from_pretrained("facebook/
|
11 |
|
12 |
|
13 |
this_description = '''
|
14 |
-
Using facebook/
|
15 |
|
16 |
Chinese(zh)
|
17 |
English(en)
|
@@ -24,7 +24,7 @@ Vietnamese(vi)
|
|
24 |
|
25 |
'''
|
26 |
|
27 |
-
# From facebook/
|
28 |
lang_codes = {
|
29 |
"Afrikaans": "af",
|
30 |
"Amharic": "am",
|
|
|
1 |
+
# Based on example code of https://huggingface.co/facebook/m2m100_1.2B
|
2 |
|
3 |
|
4 |
import gradio as gr
|
5 |
from transformers import M2M100ForConditionalGeneration, M2M100Tokenizer
|
6 |
|
7 |
model = M2M100ForConditionalGeneration.from_pretrained(
|
8 |
+
"facebook/m2m100_1.2B")
|
9 |
|
10 |
+
tokenizer = M2M100Tokenizer.from_pretrained("facebook/m2m100_1.2B")
|
11 |
|
12 |
|
13 |
this_description = '''
|
14 |
+
Using facebook/m2m100_1.2B pre-trained model.
|
15 |
|
16 |
Chinese(zh)
|
17 |
English(en)
|
|
|
24 |
|
25 |
'''
|
26 |
|
27 |
+
# From facebook/m2m100_1.2B
|
28 |
lang_codes = {
|
29 |
"Afrikaans": "af",
|
30 |
"Amharic": "am",
|