debug
Browse files
app.py
CHANGED
@@ -36,8 +36,8 @@ def init_chain():
|
|
36 |
combine_prompt_template = """
|
37 |
ใใชใใฏใใขใฏใปใณใใฅใขใฎAIใขใทในใฟใณใใงใใ
|
38 |
ใใชใใซใฏใไปฅไธใฎใใใช้ทใใใญใฅใกใณใใฎๆ็ฒ้จๅใจ่ณชๅใไธใใใใฆใใพใใ
|
39 |
-
|
40 |
-
|
41 |
=========
|
42 |
ใใญในใ๏ผ{summaries}
|
43 |
=========
|
@@ -97,10 +97,12 @@ if __name__ == "__main__":
|
|
97 |
if st.button("Submit"):
|
98 |
try:
|
99 |
query = question.strip()
|
|
|
100 |
docs = docsearch.similarity_search(query, k=3)
|
101 |
result = chain(
|
102 |
{"input_documents": docs, "question": query},
|
103 |
)
|
|
|
104 |
answer_slot.markdown(format_result_to_markdown(result))
|
105 |
except Exception as e:
|
106 |
st.write(e)
|
|
|
36 |
combine_prompt_template = """
|
37 |
ใใชใใฏใใขใฏใปใณใใฅใขใฎAIใขใทในใฟใณใใงใใ
|
38 |
ใใชใใซใฏใไปฅไธใฎใใใช้ทใใใญใฅใกใณใใฎๆ็ฒ้จๅใจ่ณชๅใไธใใใใฆใใพใใ
|
39 |
+
ๆไพใใใใใญในใใๅ่ใใฆ็ญใใฆใใ ใใใ
|
40 |
+
ๆไพใใใใใญในใใซๆ นๆ ใใชใๅ ดๅใฏใใใใใชใใจ็ญใใชใใใ็ญใใไฝใไธใใชใใงใใ ใใใ
|
41 |
=========
|
42 |
ใใญในใ๏ผ{summaries}
|
43 |
=========
|
|
|
97 |
if st.button("Submit"):
|
98 |
try:
|
99 |
query = question.strip()
|
100 |
+
st.write(help(docsearch.index.search))
|
101 |
docs = docsearch.similarity_search(query, k=3)
|
102 |
result = chain(
|
103 |
{"input_documents": docs, "question": query},
|
104 |
)
|
105 |
+
|
106 |
answer_slot.markdown(format_result_to_markdown(result))
|
107 |
except Exception as e:
|
108 |
st.write(e)
|