Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -189,7 +189,7 @@ last_interaction = gr.State(None)
|
|
189 |
|
190 |
def chat(question, manual, history, liked):
|
191 |
history = history or []
|
192 |
-
|
193 |
conv = format_chat_prompt(history)
|
194 |
|
195 |
manual_list = {"Toyota_Corolla_2024_TR": -8580416610875007536,
|
@@ -348,8 +348,8 @@ def chat(question, manual, history, liked):
|
|
348 |
conv.append({"role": "user", "content": prompt})
|
349 |
conv.append({"role": "assistant", "content": response})
|
350 |
|
351 |
-
|
352 |
-
|
353 |
print("Answer:--- %s seconds ---" % (time.time() - start_time))
|
354 |
|
355 |
# Store the last interaction without saving to the database yet
|
|
|
189 |
|
190 |
def chat(question, manual, history, liked):
|
191 |
history = history or []
|
192 |
+
|
193 |
conv = format_chat_prompt(history)
|
194 |
|
195 |
manual_list = {"Toyota_Corolla_2024_TR": -8580416610875007536,
|
|
|
348 |
conv.append({"role": "user", "content": prompt})
|
349 |
conv.append({"role": "assistant", "content": response})
|
350 |
|
351 |
+
|
352 |
+
history.append((question, response))
|
353 |
print("Answer:--- %s seconds ---" % (time.time() - start_time))
|
354 |
|
355 |
# Store the last interaction without saving to the database yet
|