Charles Chan
commited on
Commit
·
cd06550
1
Parent(s):
8db8541
coding
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def answer_question(repo_id, temperature, max_length, question):
|
|
88 |
with st.spinner("正在筛选本地数据集..."):
|
89 |
question_embedding = st.session_state.embeddings.embed_query(question)
|
90 |
question_embedding_str = " ".join(map(str, question_embedding))
|
91 |
-
docs_and_scores = st.session_state.db.
|
92 |
|
93 |
context_list = []
|
94 |
for doc, score in docs_and_scores:
|
|
|
88 |
with st.spinner("正在筛选本地数据集..."):
|
89 |
question_embedding = st.session_state.embeddings.embed_query(question)
|
90 |
question_embedding_str = " ".join(map(str, question_embedding))
|
91 |
+
docs_and_scores = st.session_state.db.similarity_search_with_relevance_scores(question_embedding_str)
|
92 |
|
93 |
context_list = []
|
94 |
for doc, score in docs_and_scores:
|