devve1 commited on
Commit
2c86ea1
1 Parent(s): 9995d12

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -333,7 +333,8 @@ def on_change_documents_only():
333
  Context: {context}
334
 
335
  Answer:""",
336
- 'tooltip': 'The AI answer your questions only considering the documents provided'
 
337
  }
338
  else:
339
  st.session_state.toggle_docs = {
@@ -343,7 +344,8 @@ def on_change_documents_only():
343
  {context}
344
 
345
  Question: {query}""",
346
- 'tooltip': """The AI answer your questions considering the documents provided, and if it doesn't found the answer in them, try to find in its own internal knowledge"""
 
347
  }
348
 
349
 
@@ -481,11 +483,13 @@ if __name__ == '__main__':
481
  Context: {context}
482
 
483
  Answer:""",
484
- 'tooltip': 'The AI answer your questions only considering the documents provided'
 
485
  }
486
 
487
  st.toggle(
488
  label="""Enable 'Documents-Only' Mode""",
 
489
  on_change=on_change_documents_only,
490
  key="documents_only",
491
  help=st.session_state.toggle_docs['tooltip']
 
333
  Context: {context}
334
 
335
  Answer:""",
336
+ 'tooltip': 'The AI answer your questions only considering the documents provided',
337
+ 'display': True
338
  }
339
  else:
340
  st.session_state.toggle_docs = {
 
344
  {context}
345
 
346
  Question: {query}""",
347
+ 'tooltip': """The AI answer your questions considering the documents provided, and if it doesn't found the answer in them, try to find in its own internal knowledge""",
348
+ 'display': False
349
  }
350
 
351
 
 
483
  Context: {context}
484
 
485
  Answer:""",
486
+ 'tooltip': 'The AI answer your questions only considering the documents provided',
487
+ 'display': True
488
  }
489
 
490
  st.toggle(
491
  label="""Enable 'Documents-Only' Mode""",
492
+ value=st.session_state.toggle_docs['display'],
493
  on_change=on_change_documents_only,
494
  key="documents_only",
495
  help=st.session_state.toggle_docs['tooltip']