Update app.py
Browse files
app.py
CHANGED
@@ -476,8 +476,17 @@ if __name__ == '__main__':
|
|
476 |
with st.sidebar:
|
477 |
st.divider()
|
478 |
|
479 |
-
if '
|
480 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
481 |
|
482 |
st.toggle(
|
483 |
label="""Enable 'Documents-Only' Mode""",
|
|
|
476 |
with st.sidebar:
|
477 |
st.divider()
|
478 |
|
479 |
+
if 'toggle_docs' not in st.session_state:
|
480 |
+
st.session_state.toggle_docs = {
|
481 |
+
'qa_prompt': """You are an assistant for question-answering tasks. Use the following pieces of retrieved context to answer the question. If you don't know the answer, reply with 'no_answer'. Use three sentences maximum and keep the answer concise.
|
482 |
+
|
483 |
+
Question: {query}
|
484 |
+
|
485 |
+
Context: {context}
|
486 |
+
|
487 |
+
Answer:""",
|
488 |
+
'tooltip': 'The AI answer your questions only considering the documents provided'
|
489 |
+
}
|
490 |
|
491 |
st.toggle(
|
492 |
label="""Enable 'Documents-Only' Mode""",
|