lfoppiano commited on
Commit
8520312
1 Parent(s): c2c0fd1

add more embedding functions

Browse files
Files changed (1) hide show
  1. streamlit_app.py +4 -11
streamlit_app.py CHANGED
@@ -39,7 +39,10 @@ OPEN_MODELS = {
39
  DEFAULT_OPEN_EMBEDDING_NAME = 'Default (all-MiniLM-L6-v2)'
40
  OPEN_EMBEDDINGS = {
41
  DEFAULT_OPEN_EMBEDDING_NAME: 'all-MiniLM-L6-v2',
42
- 'Salesforce/SFR-Embedding-Mistral': 'Salesforce/SFR-Embedding-Mistral'
 
 
 
43
  }
44
 
45
  if 'rqa' not in st.session_state:
@@ -358,16 +361,6 @@ with st.sidebar:
358
  st.markdown("**Revision number**: [" + st.session_state[
359
  'git_rev'] + "](https://github.com/lfoppiano/document-qa/commit/" + st.session_state['git_rev'] + ")")
360
 
361
- st.header("Query mode (Advanced use)")
362
- st.markdown(
363
- """By default, the mode is set to LLM (Language Model) which enables question/answering.
364
- You can directly ask questions related to the document content, and the system will answer the question using content from the document.""")
365
-
366
- st.markdown(
367
- """If you switch the mode to "Embedding," the system will return specific chunks from the document
368
- that are semantically related to your query. This mode helps to test why sometimes the answers are not
369
- satisfying or incomplete. """)
370
-
371
  if uploaded_file and not st.session_state.loaded_embeddings:
372
  if model not in st.session_state['api_keys']:
373
  st.error("Before uploading a document, you must enter the API key. ")
 
39
  DEFAULT_OPEN_EMBEDDING_NAME = 'Default (all-MiniLM-L6-v2)'
40
  OPEN_EMBEDDINGS = {
41
  DEFAULT_OPEN_EMBEDDING_NAME: 'all-MiniLM-L6-v2',
42
+ 'SFR-Embedding-Mistral': 'Salesforce/SFR-Embedding-Mistral',
43
+ 'SFR-Embedding-2_R': 'Salesforce/SFR-Embedding-2_R',
44
+ 'NV-Embed': 'nvidia/NV-Embed-v1',
45
+ 'e5-mistral-7b-instruct': 'intfloat/e5-mistral-7b-instruct'
46
  }
47
 
48
  if 'rqa' not in st.session_state:
 
361
  st.markdown("**Revision number**: [" + st.session_state[
362
  'git_rev'] + "](https://github.com/lfoppiano/document-qa/commit/" + st.session_state['git_rev'] + ")")
363
 
 
 
 
 
 
 
 
 
 
 
364
  if uploaded_file and not st.session_state.loaded_embeddings:
365
  if model not in st.session_state['api_keys']:
366
  st.error("Before uploading a document, you must enter the API key. ")