soyleyicicem commited on
Commit
952ca4e
·
verified ·
1 Parent(s): fda10d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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
- history.append((question, ""))
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
- history[-1] = (question, response)
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
 
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