mod app
Browse files
app.py
CHANGED
@@ -23,7 +23,8 @@ if st.session_state.step == 1:
|
|
23 |
if st.button("Invia", key='button_step1'):
|
24 |
if user_input:
|
25 |
st.session_state.user_input = user_input
|
26 |
-
st.
|
|
|
27 |
st.session_state.step = 2
|
28 |
|
29 |
if st.session_state.step == 2:
|
@@ -47,7 +48,7 @@ if st.session_state.step == 2:
|
|
47 |
if documents:
|
48 |
with st.spinner('Preparando i documenti...'):
|
49 |
st.session_state.db = prepare_documents(documents)
|
50 |
-
with st.spinner('Interrogando
|
51 |
st.session_state.answer, st.session_state.sources = get_answer(st.session_state.user_input, st.session_state.db)
|
52 |
st.session_state.step = 3
|
53 |
|
@@ -59,7 +60,7 @@ if st.session_state.step == 3:
|
|
59 |
if st.button("Invia", key='button_step3'):
|
60 |
if new_question:
|
61 |
st.session_state.user_input = new_question
|
62 |
-
with st.spinner('Interrogando
|
63 |
st.session_state.answer, st.session_state.sources = get_answer(new_question, st.session_state.db)
|
64 |
st.rerun()
|
65 |
|
|
|
23 |
if st.button("Invia", key='button_step1'):
|
24 |
if user_input:
|
25 |
st.session_state.user_input = user_input
|
26 |
+
with st.spinner('Interrogando il modello...'):
|
27 |
+
st.session_state.clarify_answer = get_clarification_answer(user_input)
|
28 |
st.session_state.step = 2
|
29 |
|
30 |
if st.session_state.step == 2:
|
|
|
48 |
if documents:
|
49 |
with st.spinner('Preparando i documenti...'):
|
50 |
st.session_state.db = prepare_documents(documents)
|
51 |
+
with st.spinner('Interrogando il modello...'):
|
52 |
st.session_state.answer, st.session_state.sources = get_answer(st.session_state.user_input, st.session_state.db)
|
53 |
st.session_state.step = 3
|
54 |
|
|
|
60 |
if st.button("Invia", key='button_step3'):
|
61 |
if new_question:
|
62 |
st.session_state.user_input = new_question
|
63 |
+
with st.spinner('Interrogando il modello...'):
|
64 |
st.session_state.answer, st.session_state.sources = get_answer(new_question, st.session_state.db)
|
65 |
st.rerun()
|
66 |
|