Spaces:
Sleeping
Sleeping
Improve flow
Browse files
app.py
CHANGED
@@ -94,18 +94,20 @@ def main():
|
|
94 |
st.session_state.crc = crc
|
95 |
st.success("File processed successfully!")
|
96 |
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
|
|
|
|
104 |
|
105 |
-
|
106 |
-
|
107 |
|
108 |
-
|
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):
|