Spaces:
Sleeping
Sleeping
AndriiPets
commited on
Commit
•
d0c4312
1
Parent(s):
063cdbd
initial
Browse files- generator.py +1 -1
- utils/translators/en_ru/en_ru.py +2 -1
- utils/translators/en_ru/ru_en.py +2 -1
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=r'C:\Users\pezol\OneDrive\Desktop\
|
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=r'C:\Users\pezol\OneDrive\Desktop\django_projects\spaces_chefGen\ChefGen\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
@@ -1,7 +1,8 @@
|
|
1 |
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-en-ru"
|
4 |
-
tokenizer = FSMTTokenizer.from_pretrained(
|
|
|
5 |
model = FSMTForConditionalGeneration.from_pretrained(
|
6 |
mname, cache_dir='./cache')
|
7 |
|
|
|
1 |
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-en-ru"
|
4 |
+
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
+
mname, cache_dir=r'C:\Users\pezol\OneDrive\Desktop\django_projects\spaces_chefGen\ChefGen\cache')
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
mname, cache_dir='./cache')
|
8 |
|
utils/translators/en_ru/ru_en.py
CHANGED
@@ -1,7 +1,8 @@
|
|
1 |
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-ru-en"
|
4 |
-
tokenizer = FSMTTokenizer.from_pretrained(
|
|
|
5 |
model = FSMTForConditionalGeneration.from_pretrained(
|
6 |
mname, cache_dir='./cache')
|
7 |
|
|
|
1 |
|
2 |
from transformers import FSMTForConditionalGeneration, FSMTTokenizer
|
3 |
mname = "facebook/wmt19-ru-en"
|
4 |
+
tokenizer = FSMTTokenizer.from_pretrained(
|
5 |
+
mname, cache_dir=r'C:\Users\pezol\OneDrive\Desktop\django_projects\spaces_chefGen\ChefGen\cache')
|
6 |
model = FSMTForConditionalGeneration.from_pretrained(
|
7 |
mname, cache_dir='./cache')
|
8 |
|