Spaces:
Running
Running
Circhastic
commited on
Commit
•
57d4b86
1
Parent(s):
b42f3e1
Version 1 hotfix #35 for QA
Browse files
app.py
CHANGED
@@ -360,15 +360,16 @@ if (st.session_state.uploaded):
|
|
360 |
col[0].subheader(f"Forecasted sales in the next {period} days")
|
361 |
col[0].write(df)
|
362 |
with col[1]:
|
|
|
363 |
with st.form("question_form"):
|
364 |
question = st.text_input('Ask a Question about the Forecasted Data', placeholder="What is the total sales in the month of December?")
|
365 |
query_button = st.form_submit_button(label='Generate Answer')
|
366 |
if query_button or question:
|
367 |
answer = get_converted_answer(df, question)
|
368 |
if answer is not None:
|
369 |
-
|
370 |
else:
|
371 |
-
|
372 |
st.session_state.forecasted = True
|
373 |
|
374 |
|
|
|
360 |
col[0].subheader(f"Forecasted sales in the next {period} days")
|
361 |
col[0].write(df)
|
362 |
with col[1]:
|
363 |
+
col[1] = st.subheader("Question-Answering")
|
364 |
with st.form("question_form"):
|
365 |
question = st.text_input('Ask a Question about the Forecasted Data', placeholder="What is the total sales in the month of December?")
|
366 |
query_button = st.form_submit_button(label='Generate Answer')
|
367 |
if query_button or question:
|
368 |
answer = get_converted_answer(df, question)
|
369 |
if answer is not None:
|
370 |
+
st.write("The answer is:", answer)
|
371 |
else:
|
372 |
+
st.write("Answer is not found in table")
|
373 |
st.session_state.forecasted = True
|
374 |
|
375 |
|