Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def load_memory(filename='chat_memory.pkl'):
|
|
40 |
session_memory = load_memory()
|
41 |
|
42 |
# ---- Response Generation ----
|
43 |
-
def generate_response(prompt, max_length=
|
44 |
inputs = tokenizer(prompt, return_tensors='pt', padding=True, truncation=True, max_length=max_length)
|
45 |
input_ids = inputs['input_ids'].to(device)
|
46 |
attention_mask = inputs['attention_mask'].to(device)
|
|
|
40 |
session_memory = load_memory()
|
41 |
|
42 |
# ---- Response Generation ----
|
43 |
+
def generate_response(prompt, max_length=25):
|
44 |
inputs = tokenizer(prompt, return_tensors='pt', padding=True, truncation=True, max_length=max_length)
|
45 |
input_ids = inputs['input_ids'].to(device)
|
46 |
attention_mask = inputs['attention_mask'].to(device)
|