Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,8 +6,12 @@ title = "🤖 AI ChatBot"
|
|
6 |
description = "A State-of-the-Art Large-scale Pretrained Response generation model (DialoGPT)"
|
7 |
examples = [["How are you?"]]
|
8 |
|
9 |
-
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-large")
|
10 |
-
model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-large")
|
|
|
|
|
|
|
|
|
11 |
|
12 |
def generate_response(input_text, chat_history=[]):
|
13 |
# Tokenize the new input sentence
|
|
|
6 |
description = "A State-of-the-Art Large-scale Pretrained Response generation model (DialoGPT)"
|
7 |
examples = [["How are you?"]]
|
8 |
|
9 |
+
# tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-large")
|
10 |
+
# model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-large")
|
11 |
+
|
12 |
+
# Load model directly
|
13 |
+
tokenizer = AutoTokenizer.from_pretrained("PygmalionAI/pygmalion-6b")
|
14 |
+
model = AutoModelForCausalLM.from_pretrained("PygmalionAI/pygmalion-6b")
|
15 |
|
16 |
def generate_response(input_text, chat_history=[]):
|
17 |
# Tokenize the new input sentence
|