Spaces:
Sleeping
Sleeping
AndriiPets
commited on
Commit
•
9743b50
1
Parent(s):
d0c4312
initial
Browse files- generator.py +1 -1
- utils/translators/en_ru/en_ru.py +2 -2
- utils/translators/en_ru/ru_en.py +2 -2
generator.py
CHANGED
@@ -16,7 +16,7 @@ model_name_or_path = "flax-community/t5-recipe-generation"
|
|
16 |
task = "text2text-generation"
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained(
|
19 |
-
model_name_or_path, cache_dir=
|
20 |
generator = pipeline(task, model=model_name_or_path,
|
21 |
tokenizer=model_name_or_path)
|
22 |
|
|
|
16 |
task = "text2text-generation"
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained(
|
19 |
+
model_name_or_path, cache_dir='.\cache')
|
20 |
generator = pipeline(task, model=model_name_or_path,
|
21 |
tokenizer=model_name_or_path)
|
22 |
|
utils/translators/en_ru/en_ru.py
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-en-ru"
|
4 |
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
-
mname, cache_dir=
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
-
mname, cache_dir='
|
8 |
|
9 |
|
10 |
def translator_en_ru(text):
|
|
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-en-ru"
|
4 |
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
+
mname, cache_dir='../../cache')
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
+
mname, cache_dir='../../cache')
|
8 |
|
9 |
|
10 |
def translator_en_ru(text):
|
utils/translators/en_ru/ru_en.py
CHANGED
@@ -2,9 +2,9 @@
|
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-ru-en"
|
4 |
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
-
mname, cache_dir=
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
-
mname, cache_dir='
|
8 |
|
9 |
|
10 |
def translate_ru_en(text):
|
|
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-ru-en"
|
4 |
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
+
mname, cache_dir='../../cache')
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
+
mname, cache_dir='../../cache')
|
8 |
|
9 |
|
10 |
def translate_ru_en(text):
|