akhaliq HF staff commited on
Commit
4d925f9
·
verified ·
1 Parent(s): eaf2525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -41,9 +41,8 @@ def chat_with_gemini(user_api_key, user_input, history):
41
 
42
  chatbot_reply = response.text.strip()
43
 
44
- # Append the user input and chatbot reply to the history
45
- history.append([user_input, ""]) # User message
46
- history.append(["", chatbot_reply]) # Bot response
47
 
48
  return history, history
49
  except Exception as e:
 
41
 
42
  chatbot_reply = response.text.strip()
43
 
44
+ # Append the user input and chatbot reply to the history as a single entry
45
+ history.append([user_input, chatbot_reply])
 
46
 
47
  return history, history
48
  except Exception as e: