Clone77 commited on
Commit
dce2016
·
verified ·
1 Parent(s): daa2513

Update pages/python.py

Browse files
Files changed (1) hide show
  1. pages/python.py +6 -5
pages/python.py CHANGED
@@ -50,6 +50,11 @@ try:
50
  # --- Session State ---
51
  if PAGE_KEY not in st.session_state:
52
  st.session_state[PAGE_KEY] = []
 
 
 
 
 
53
  # --- Chat Form ---
54
  with st.form(key="chat_form"):
55
  user_input = st.text_input("Ask your question:")
@@ -75,11 +80,7 @@ try:
75
  st.session_state[PAGE_KEY].append((user_input, result.content))
76
 
77
  # --- Display Chat History ---
78
- st.subheader("🗨️ Chat History")
79
- for user, bot in st.session_state[PAGE_KEY]:
80
- st.markdown(f"**You:** {user}")
81
- st.markdown(f"**Mentor:** {bot}")
82
- st.markdown("---")
83
  except:
84
  st.warning('The token limit has reached please revisit in 24 hours!')
85
 
 
50
  # --- Session State ---
51
  if PAGE_KEY not in st.session_state:
52
  st.session_state[PAGE_KEY] = []
53
+ st.subheader("🗨️ Chat History")
54
+ for user, bot in st.session_state[PAGE_KEY]:
55
+ st.markdown(f"**You:** {user}")
56
+ st.markdown(f"**Mentor:** {bot}")
57
+ st.markdown("---")
58
  # --- Chat Form ---
59
  with st.form(key="chat_form"):
60
  user_input = st.text_input("Ask your question:")
 
80
  st.session_state[PAGE_KEY].append((user_input, result.content))
81
 
82
  # --- Display Chat History ---
83
+
 
 
 
 
84
  except:
85
  st.warning('The token limit has reached please revisit in 24 hours!')
86