Spaces:
Runtime error
Runtime error
dennis-fast
commited on
Commit
·
25ab3ef
1
Parent(s):
440f6f8
Update app.py
Browse files
app.py
CHANGED
@@ -4,8 +4,11 @@ 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 = 'dennis-fast/DialoGPT-ElonMusk'
|
8 |
+
model_name = 'luca-martial/DialoGPT-Elon'
|
9 |
+
|
10 |
+
tokenizer = GPT2Tokenizer.from_pretrained(model_name)
|
11 |
+
model = GPT2LMHeadModel.from_pretrained(model_name)
|
12 |
|
13 |
def predict(input, history=[]):
|
14 |
# tokenize the new input sentence
|