Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,6 +33,7 @@ def chat_with_distilgpt2(input_text):
|
|
| 33 |
|
| 34 |
# Combine the (possibly summarized) history with the current user input
|
| 35 |
full_input = f"{conversation_history}\nUser: {input_text}\nAssistant:"
|
|
|
|
| 36 |
|
| 37 |
# Tokenize the input and convert to tensor
|
| 38 |
input_ids = tokenizer.encode(full_input, return_tensors="pt").to(device)
|
|
|
|
| 33 |
|
| 34 |
# Combine the (possibly summarized) history with the current user input
|
| 35 |
full_input = f"{conversation_history}\nUser: {input_text}\nAssistant:"
|
| 36 |
+
no_memory_input = f"Question: {input_text}\nAnswer:"
|
| 37 |
|
| 38 |
# Tokenize the input and convert to tensor
|
| 39 |
input_ids = tokenizer.encode(full_input, return_tensors="pt").to(device)
|