kxx-kkk commited on
Commit
7b1054f
·
verified ·
1 Parent(s): 2a661c9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -40,8 +40,11 @@ with tab1:
40
  question = st.text_input(label="Enter the question: ", key="questionInput")
41
 
42
  if example:
43
- st.session_state["context"] = sample_text
44
- st.session_state["question"] = sample_question
 
 
 
45
 
46
  button = st.button("Get answer")
47
  if button:
 
40
  question = st.text_input(label="Enter the question: ", key="questionInput")
41
 
42
  if example:
43
+ if context != st.session_state.get("context"):
44
+ st.session_state["context"] = context
45
+
46
+ if question != st.session_state.get("question"):
47
+ st.session_state["question"] = sample_question
48
 
49
  button = st.button("Get answer")
50
  if button: