Kushwanth Chowday Kandala commited on
Commit
8eaa269
1 Parent(s): 7cd94b3

update gemini app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -38,7 +38,7 @@ def chat_actions():
38
  st.session_state["chat_history"].append(
39
  {
40
  "role": "assistant",
41
- "content": response,
42
  }, # This can be replaced with your chat response logic
43
  )
44
 
@@ -49,8 +49,6 @@ if "chat_history" not in st.session_state:
49
 
50
  st.chat_input("Enter your message", on_submit=chat_actions, key="chat_input")
51
 
52
- st.write(st.session_state["chat_history"])
53
-
54
- # for i in st.session_state["chat_history"]:
55
- # with st.chat_message(name=i["role"]):
56
- # st.write(i["content"])
 
38
  st.session_state["chat_history"].append(
39
  {
40
  "role": "assistant",
41
+ "content": response.text,
42
  }, # This can be replaced with your chat response logic
43
  )
44
 
 
49
 
50
  st.chat_input("Enter your message", on_submit=chat_actions, key="chat_input")
51
 
52
+ for i in st.session_state["chat_history"]:
53
+ with st.chat_message(name=i["role"]):
54
+ st.write(i["content"])