VishnuRamDebyez commited on
Commit
9a6ab2a
·
verified ·
1 Parent(s): 91b4184

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -61,7 +61,12 @@ with st.sidebar:
61
  st.session_state.chat_history = []
62
  if st.session_state.chat_history:
63
  for idx, entry in enumerate(st.session_state.chat_history):
64
- st.write(f"Q{idx + 1}: {entry['question']}")
 
 
 
 
 
65
 
66
  # Process question and generate response
67
  if prompt1:
 
61
  st.session_state.chat_history = []
62
  if st.session_state.chat_history:
63
  for idx, entry in enumerate(st.session_state.chat_history):
64
+ if st.button(f"Q{idx + 1}: {entry['question']}"):
65
+ st.session_state.selected_question = entry['question']
66
+
67
+ # Display selected question from history
68
+ if "selected_question" in st.session_state:
69
+ st.write(f"**Selected Question:** {st.session_state.selected_question}")
70
 
71
  # Process question and generate response
72
  if prompt1: