Spaces:
Build error
Build error
dennis-fast
commited on
Commit
·
b8f7f6f
1
Parent(s):
91f14e5
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,8 @@ import torch
|
|
4 |
|
5 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
6 |
|
7 |
-
tokenizer = GPT2Tokenizer.from_pretrained('microsoft/DialoGPT-
|
8 |
-
model = GPT2LMHeadModel.from_pretrained('microsoft/DialoGPT-
|
9 |
|
10 |
def predict(input, history=[]):
|
11 |
# tokenize the new input sentence
|
@@ -25,7 +25,7 @@ def predict(input, history=[]):
|
|
25 |
|
26 |
|
27 |
gr.Interface(fn=predict,
|
28 |
-
title="DialoGPT-
|
29 |
inputs=["text", "state"],
|
30 |
outputs=["chatbot", "state"],
|
31 |
allow_screenshot=False,
|
|
|
4 |
|
5 |
from transformers import GPT2LMHeadModel, GPT2Tokenizer
|
6 |
|
7 |
+
tokenizer = GPT2Tokenizer.from_pretrained('microsoft/DialoGPT-small')
|
8 |
+
model = GPT2LMHeadModel.from_pretrained('microsoft/DialoGPT-small')
|
9 |
|
10 |
def predict(input, history=[]):
|
11 |
# tokenize the new input sentence
|
|
|
25 |
|
26 |
|
27 |
gr.Interface(fn=predict,
|
28 |
+
title="DialoGPT-small",
|
29 |
inputs=["text", "state"],
|
30 |
outputs=["chatbot", "state"],
|
31 |
allow_screenshot=False,
|