Spaces:
Runtime error
Runtime error
Upload 7 files (#7)
Browse files- Upload 7 files (93d5382a85760c522e5263ad22ce1a16745935c0)
app.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
import numpy as np
|
2 |
import streamlit_scrollable_textbox as stx
|
3 |
-
|
4 |
import pinecone
|
5 |
import streamlit as st
|
6 |
|
@@ -89,11 +89,11 @@ sparse_scores = np.argsort(bm25.get_scores(tokenized_query), axis=0)[::-1]
|
|
89 |
indices = get_bm25_search_hits(corpus, sparse_scores, 50)
|
90 |
|
91 |
|
92 |
-
dense_embedding = instructor_model.predict(
|
93 |
query_embedding_instruction,
|
94 |
query_text,
|
95 |
api_name="/predict",
|
96 |
-
)
|
97 |
|
98 |
|
99 |
text_embedding_instructions_choice = [
|
|
|
1 |
import numpy as np
|
2 |
import streamlit_scrollable_textbox as stx
|
3 |
+
from ast import literal_eval
|
4 |
import pinecone
|
5 |
import streamlit as st
|
6 |
|
|
|
89 |
indices = get_bm25_search_hits(corpus, sparse_scores, 50)
|
90 |
|
91 |
|
92 |
+
dense_embedding = literal_eval(instructor_model.predict(
|
93 |
query_embedding_instruction,
|
94 |
query_text,
|
95 |
api_name="/predict",
|
96 |
+
))
|
97 |
|
98 |
|
99 |
text_embedding_instructions_choice = [
|