harshil1973 commited on
Commit
56b2c14
1 Parent(s): 0633d3c

upload documents

Browse files
Files changed (2) hide show
  1. .gitattributes +1 -0
  2. app.py +2 -2
.gitattributes CHANGED
@@ -38,3 +38,4 @@ sparse_retriever/** filter=lfs diff=lfs merge=lfs -text
38
  collection/** filter=lfs diff=lfs merge=lfs -text
39
  state.db filter=lfs diff=lfs merge=lfs -text
40
  documents/** filter=lfs diff=lfs merge=lfs -text
 
 
38
  collection/** filter=lfs diff=lfs merge=lfs -text
39
  state.db filter=lfs diff=lfs merge=lfs -text
40
  documents/** filter=lfs diff=lfs merge=lfs -text
41
+ documents/*.pdf filter=lfs diff=lfs merge=lfs -text
app.py CHANGED
@@ -64,7 +64,7 @@ with st.sidebar:
64
  max_value=10,
65
  value=10
66
  )
67
-
68
  @st.cache_resource(show_spinner=False)
69
  def load_retriver():
70
  dense_retriever = VectorIndexRetriever(
@@ -148,7 +148,7 @@ if search_btn and query:
148
  st.write("reranking score: ", node["score"])
149
  st.write("node id", node["id"])
150
  with st.expander("See Summary"):
151
- text = extract_pdf_content("/documents/" + node["meta"].get("file_name"))
152
  formatted_template = template.format(document_content=text)
153
  summary = Settings.llm.complete(formatted_template)
154
  st.write(summary)
 
64
  max_value=10,
65
  value=10
66
  )
67
+
68
  @st.cache_resource(show_spinner=False)
69
  def load_retriver():
70
  dense_retriever = VectorIndexRetriever(
 
148
  st.write("reranking score: ", node["score"])
149
  st.write("node id", node["id"])
150
  with st.expander("See Summary"):
151
+ text = extract_pdf_content("./documents/" + node["meta"].get("file_name"))
152
  formatted_template = template.format(document_content=text)
153
  summary = Settings.llm.complete(formatted_template)
154
  st.write(summary)