Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -349,16 +349,14 @@ if "menu" not in st.session_state:
|
|
349 |
|
350 |
# sidebar with menu navigation
|
351 |
with st.sidebar:
|
352 |
-
st.subheader("DO NOT NAVIGATE between pages when agent is still generating messages in the chat. Wait for query to complete first
|
353 |
-
|
|
|
354 |
icons=['house', 'gear', 'gear', 'gear'], menu_icon="cast", default_index=0)
|
355 |
st.spinner("test")
|
356 |
-
|
357 |
|
358 |
-
col1, col2 = st.columns(2)
|
359 |
-
# with col1:
|
360 |
|
361 |
-
if
|
362 |
st.header("Chat")
|
363 |
|
364 |
# Store the conversation in the session state.
|
@@ -432,16 +430,20 @@ if selected == "Chatbot":
|
|
432 |
st.markdown(response)
|
433 |
|
434 |
|
435 |
-
|
436 |
-
|
|
|
|
|
|
|
|
|
437 |
|
438 |
|
439 |
-
if
|
440 |
-
st.header(
|
441 |
try:
|
442 |
st.subheader(st.session_state['source_documents'][0])
|
443 |
for doc in st.session_state['source_documents'][1:]:
|
444 |
st.write("Source: " + doc.metadata['source'])
|
445 |
st.write(doc)
|
446 |
except:
|
447 |
-
st.write("No source documents retrieved yet. Please run a user query before coming back to this page.")
|
|
|
349 |
|
350 |
# sidebar with menu navigation
|
351 |
with st.sidebar:
|
352 |
+
st.subheader("DO NOT NAVIGATE between pages when agent is still generating messages in the chat. Wait for query to complete first.")
|
353 |
+
st.write("")
|
354 |
+
page = option_menu("Main Menu", st.session_state["menu"],
|
355 |
icons=['house', 'gear', 'gear', 'gear'], menu_icon="cast", default_index=0)
|
356 |
st.spinner("test")
|
|
|
357 |
|
|
|
|
|
358 |
|
359 |
+
if page == "Chatbot":
|
360 |
st.header("Chat")
|
361 |
|
362 |
# Store the conversation in the session state.
|
|
|
430 |
st.markdown(response)
|
431 |
|
432 |
|
433 |
+
if page == "Chat Config":
|
434 |
+
st.header(page)
|
435 |
+
|
436 |
+
|
437 |
+
if page == "Document, Retriever, Web Scraping Config":
|
438 |
+
st.header(page)
|
439 |
|
440 |
|
441 |
+
if page == "Source Documents for Last Query":
|
442 |
+
st.header(page)
|
443 |
try:
|
444 |
st.subheader(st.session_state['source_documents'][0])
|
445 |
for doc in st.session_state['source_documents'][1:]:
|
446 |
st.write("Source: " + doc.metadata['source'])
|
447 |
st.write(doc)
|
448 |
except:
|
449 |
+
st.write("No source documents retrieved yet. Please run a user query before coming back to this page.")
|