Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -142,7 +142,7 @@ def bi_encode(bi_enc,passages):
|
|
| 142 |
|
| 143 |
corpus_embeddings = bi_encoder.encode(['passage: ' + sentence for sentence in passages], convert_to_tensor=True)
|
| 144 |
|
| 145 |
-
elif bi_enc == 'BAAI/bge-base-en':
|
| 146 |
|
| 147 |
instruction = "Represent this sentence for searching relevant passages: "
|
| 148 |
|
|
@@ -191,7 +191,7 @@ def bm25_api(passages):
|
|
| 191 |
|
| 192 |
return bm25
|
| 193 |
|
| 194 |
-
bi_enc_options = ["BAAI/bge-base-en","multi-qa-mpnet-base-dot-v1","all-mpnet-base-v2","multi-qa-MiniLM-L6-cos-v1",'intfloat/e5-base-v2']
|
| 195 |
|
| 196 |
def display_df_as_table(model,top_k,score='score'):
|
| 197 |
# Display the df with text and scores as a table
|
|
@@ -287,7 +287,7 @@ st.markdown("""There models available to choose from:""")
|
|
| 287 |
st.markdown(
|
| 288 |
"""
|
| 289 |
Model Source:
|
| 290 |
-
- Bi-Encoders - [BAAI/bge-base-en](https://huggingface.co/BAAI/bge-base-en), [multi-qa-mpnet-base-dot-v1](https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-dot-v1), [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2), [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) and [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
|
| 291 |
- Cross-Encoder - [cross-encoder/ms-marco-MiniLM-L-12-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-12-v2)""")
|
| 292 |
|
| 293 |
st.markdown(
|
|
|
|
| 142 |
|
| 143 |
corpus_embeddings = bi_encoder.encode(['passage: ' + sentence for sentence in passages], convert_to_tensor=True)
|
| 144 |
|
| 145 |
+
elif bi_enc == 'BAAI/bge-base-en-v1.5':
|
| 146 |
|
| 147 |
instruction = "Represent this sentence for searching relevant passages: "
|
| 148 |
|
|
|
|
| 191 |
|
| 192 |
return bm25
|
| 193 |
|
| 194 |
+
bi_enc_options = ["BAAI/bge-base-en-v1.5","multi-qa-mpnet-base-dot-v1","all-mpnet-base-v2","multi-qa-MiniLM-L6-cos-v1",'intfloat/e5-base-v2']
|
| 195 |
|
| 196 |
def display_df_as_table(model,top_k,score='score'):
|
| 197 |
# Display the df with text and scores as a table
|
|
|
|
| 287 |
st.markdown(
|
| 288 |
"""
|
| 289 |
Model Source:
|
| 290 |
+
- Bi-Encoders - [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5), [multi-qa-mpnet-base-dot-v1](https://huggingface.co/sentence-transformers/multi-qa-mpnet-base-dot-v1), [all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2), [intfloat/e5-base-v2](https://huggingface.co/intfloat/e5-base-v2) and [all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2)
|
| 291 |
- Cross-Encoder - [cross-encoder/ms-marco-MiniLM-L-12-v2](https://huggingface.co/cross-encoder/ms-marco-MiniLM-L-12-v2)""")
|
| 292 |
|
| 293 |
st.markdown(
|