Charles Chan
commited on
Commit
·
a6c563b
1
Parent(s):
cd06550
coding
Browse files
app.py
CHANGED
@@ -86,9 +86,9 @@ def answer_question(repo_id, temperature, max_length, question):
|
|
86 |
st.success("答案生成完毕(基于模型自身)!")
|
87 |
print("答案生成完毕(基于模型自身)!")
|
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(
|
92 |
|
93 |
context_list = []
|
94 |
for doc, score in docs_and_scores:
|
|
|
86 |
st.success("答案生成完毕(基于模型自身)!")
|
87 |
print("答案生成完毕(基于模型自身)!")
|
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)
|
92 |
|
93 |
context_list = []
|
94 |
for doc, score in docs_and_scores:
|