Spaces:
Build error
Build error
dennis-fast
commited on
Commit
•
c0860ca
1
Parent(s):
d1c541a
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,9 @@ import torch
|
|
4 |
|
5 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
6 |
|
7 |
-
|
8 |
-
|
|
|
9 |
|
10 |
def predict(input, history=[]):
|
11 |
# tokenize the new input sentence
|
|
|
4 |
|
5 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
6 |
|
7 |
+
model_name = 'microsoft/DialoGPT-large'
|
8 |
+
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
9 |
+
model = GPT2LMHeadModel.from_pretrained(model_name)
|
10 |
|
11 |
def predict(input, history=[]):
|
12 |
# tokenize the new input sentence
|