Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,6 +17,8 @@ def generate_text(input_text, history):
|
|
| 17 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
| 18 |
response = output['choices'][0]['text']
|
| 19 |
history.append([input_text, response])
|
|
|
|
|
|
|
| 20 |
return response
|
| 21 |
|
| 22 |
|
|
|
|
| 17 |
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
| 18 |
response = output['choices'][0]['text']
|
| 19 |
history.append([input_text, response])
|
| 20 |
+
conversation_context = " ".join([f"{pair[0]} {pair[1]}" for pair in history])
|
| 21 |
+
print(conversation_context)
|
| 22 |
return response
|
| 23 |
|
| 24 |
|