Spaces:
Runtime error
Runtime error
Commit
Β·
88357f1
1
Parent(s):
c7f3747
Update app.py
Browse files
app.py
CHANGED
@@ -13,10 +13,10 @@ The bot is trained on blended_skill_talk dataset using facebook/blenderbot-400M-
|
|
13 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1907.06616' target='_blank'>Recipes for building an open-domain chatbot</a></p><p style='text-align: center'><a href='https://parl.ai/projects/recipes/' target='_blank'>Original PARLAI Code</a></p></center></p>"
|
14 |
|
15 |
import torch
|
16 |
-
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
|
19 |
-
model =
|
20 |
|
21 |
def predict(input, history=[]):
|
22 |
# tokenize the new input sentence
|
|
|
13 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/1907.06616' target='_blank'>Recipes for building an open-domain chatbot</a></p><p style='text-align: center'><a href='https://parl.ai/projects/recipes/' target='_blank'>Original PARLAI Code</a></p></center></p>"
|
14 |
|
15 |
import torch
|
16 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, AutoModelForCausalLM
|
17 |
|
18 |
tokenizer = AutoTokenizer.from_pretrained("facebook/blenderbot-400M-distill")
|
19 |
+
model = AutoModelForCausalLM.from_pretrained("facebook/blenderbot-400M-distill")
|
20 |
|
21 |
def predict(input, history=[]):
|
22 |
# tokenize the new input sentence
|