devve1 commited on
Commit
1b389ed
1 Parent(s): 0eb0a44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -2
app.py CHANGED
@@ -476,8 +476,17 @@ if __name__ == '__main__':
476
  with st.sidebar:
477
  st.divider()
478
 
479
- if 'documents_only' not in st.session_state:
480
- on_change_documents_only()
 
 
 
 
 
 
 
 
 
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""",