vinhnx90 commited on
Commit
5215b17
1 Parent(s): 5435ca6

Improve flow

Browse files
Files changed (1) hide show
  1. app.py +12 -10
app.py CHANGED
@@ -94,18 +94,20 @@ def main():
94
  st.session_state.crc = crc
95
  st.success("File processed successfully!")
96
 
97
- st.markdown("## Ask a Question")
98
- question = st.text_area(
99
- "Enter your question",
100
- height=93,
101
- key="question_input",
102
- )
103
- submit_button = st.button("Submit", key="submit_button")
 
 
104
 
105
- if submit_button and "crc" in st.session_state:
106
- handle_question(question)
107
 
108
- display_chat_history()
109
 
110
 
111
  def handle_question(question):
 
94
  st.session_state.crc = crc
95
  st.success("File processed successfully!")
96
 
97
+ if "crc" in st.session_state:
98
+ st.markdown("## Ask a Question")
99
+ question = st.text_area(
100
+ "Enter your question",
101
+ height=93,
102
+ key="question_input",
103
+ )
104
+
105
+ submit_button = st.button("Submit", key="submit_button")
106
 
107
+ if submit_button and "crc" in st.session_state:
108
+ handle_question(question)
109
 
110
+ display_chat_history()
111
 
112
 
113
  def handle_question(question):