istiak101 commited on
Commit
9bcb252
·
verified ·
1 Parent(s): 8a99150

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -13
app.py CHANGED
@@ -79,14 +79,6 @@ def generate_pdf(convo, topic):
79
  return None
80
  return result
81
 
82
- def submit1():
83
- st.session_state.question_input = st.session_state.qi
84
- st.session_state.qi = ""
85
-
86
- def submit2():
87
- st.session_state.context_input = st.session_state.ci
88
- st.session_state.ci = ""
89
-
90
  # --- Session Init ---
91
  if "chat_sessions" not in st.session_state:
92
  st.session_state.chat_sessions = {}
@@ -263,11 +255,8 @@ if st.session_state.current_conversation:
263
  st.error("❌ Failed to generate PDF.")
264
 
265
  # --- User Prompt ---
266
- # question_input = st.text_input("Enter your question:")
267
- # context_input = st.text_area("Enter the context:")
268
-
269
- st.text_input("Enter your question:", key="qi", on_change=submit1)
270
- st.text_area("Enter the context:", key="ci", on_change=submit2)
271
 
272
  # Button to submit
273
  if st.button("Submit"):
 
79
  return None
80
  return result
81
 
 
 
 
 
 
 
 
 
82
  # --- Session Init ---
83
  if "chat_sessions" not in st.session_state:
84
  st.session_state.chat_sessions = {}
 
255
  st.error("❌ Failed to generate PDF.")
256
 
257
  # --- User Prompt ---
258
+ question_input = st.text_input("Enter your question:")
259
+ context_input = st.text_area("Enter the context:")
 
 
 
260
 
261
  # Button to submit
262
  if st.button("Submit"):