bhaskartripathi commited on
Commit
c842dba
·
1 Parent(s): 51bc6a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -97,7 +97,8 @@ class SemanticSearch:
97
  # chunks = text_to_chunks(texts, start_page=start_page)
98
  # recommender.fit(chunks)
99
  # return 'Corpus Loaded.'
100
-
 
101
  def load_recommender(path, start_page=1):
102
  global recommender
103
  pdf_file = os.path.basename(path)
 
97
  # chunks = text_to_chunks(texts, start_page=start_page)
98
  # recommender.fit(chunks)
99
  # return 'Corpus Loaded.'
100
+
101
+ # The modified function generates embeddings based on PDF file name and page number and checks if the embeddings file exists before loading or generating it.
102
  def load_recommender(path, start_page=1):
103
  global recommender
104
  pdf_file = os.path.basename(path)