dayuan commited on
Commit
29bf3fe
ยท
1 Parent(s): 06f4599
Files changed (1) hide show
  1. app.py +4 -2
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)