Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,10 +101,25 @@ def retrieve_and_answer(question):
|
|
| 101 |
return result, docs
|
| 102 |
|
| 103 |
# Query input form
|
| 104 |
-
st.subheader("π Ask a Financial Question")
|
| 105 |
-
with st.form(key="query_form", clear_on_submit=True):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
query = st.text_input("Enter your question about ITC's financials:", placeholder="e.g., What was ITC's revenue in FY 2023?")
|
| 107 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
|
| 109 |
if submit_button:
|
| 110 |
if not query.strip():
|
|
|
|
| 101 |
return result, docs
|
| 102 |
|
| 103 |
# Query input form
|
| 104 |
+
# st.subheader("π Ask a Financial Question")
|
| 105 |
+
# with st.form(key="query_form", clear_on_submit=True):
|
| 106 |
+
# query = st.text_input("Enter your question about ITC's financials:", placeholder="e.g., What was ITC's revenue in FY 2023?")
|
| 107 |
+
# submit_button = st.form_submit_button("Get Answer")
|
| 108 |
+
|
| 109 |
+
col1, col2 = st.columns([4, 1])
|
| 110 |
+
|
| 111 |
+
with col1:
|
| 112 |
query = st.text_input("Enter your question about ITC's financials:", placeholder="e.g., What was ITC's revenue in FY 2023?")
|
| 113 |
+
|
| 114 |
+
with col2:
|
| 115 |
+
clear = st.button("Clear β")
|
| 116 |
+
|
| 117 |
+
submit_button = st.button("Get Answer β
")
|
| 118 |
+
|
| 119 |
+
# Clear the input (simulate reset)
|
| 120 |
+
if clear:
|
| 121 |
+
st.experimental_rerun()
|
| 122 |
+
|
| 123 |
|
| 124 |
if submit_button:
|
| 125 |
if not query.strip():
|