Spaces:
Runtime error
Runtime error
ChihChiu29
commited on
Commit
•
60e4f79
1
Parent(s):
3933325
switched to blenderbot
Browse files
main.py
CHANGED
@@ -12,11 +12,11 @@ from transformers import T5Tokenizer, T5ForConditionalGeneration
|
|
12 |
# FROM: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Thomas%21+How+are+you%3F
|
13 |
# tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
|
14 |
# model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill")
|
15 |
-
|
16 |
-
|
17 |
-
tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
|
18 |
-
model = T5ForConditionalGeneration.from_pretrained(
|
19 |
-
|
20 |
|
21 |
token_size_limit = 128
|
22 |
|
|
|
12 |
# FROM: https://huggingface.co/facebook/blenderbot-400M-distill?text=Hey+my+name+is+Thomas%21+How+are+you%3F
|
13 |
# tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
|
14 |
# model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-400M-distill")
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-1B-distill")
|
16 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/blenderbot-1B-distill")
|
17 |
+
# tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-small")
|
18 |
+
# model = T5ForConditionalGeneration.from_pretrained(
|
19 |
+
# "google/flan-t5-small", device_map="auto")
|
20 |
|
21 |
token_size_limit = 128
|
22 |
|