MSEAJYTHTH commited on
Commit
580b771
·
verified ·
1 Parent(s): 16b3798

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -17,9 +17,10 @@ import difflib
17
 
18
 
19
  modelPath = "MSEAJYTHTH/NFPC"
20
- db_files = "MSEAJYTHTH/NFPC"
21
  # db_files = ["MSEAJYTHTH/NFPC/index.faiss", "MSEAJYTHTH/NFPC/index.pkl"]
22
 
 
 
23
 
24
  model_kwargs = {'device':'cpu'}
25
 
@@ -33,7 +34,7 @@ embeddings = HuggingFaceEmbeddings(
33
 
34
 
35
  # 두 파일을 업로드한 후에는 다음과 같이 코드를 수정할 수 있습니다.
36
- db = FAISS.load_local(db_files, embeddings, allow_dangerous_deserialization=True)
37
 
38
 
39
  def find_best_page_content(question, keywords, db):
 
17
 
18
 
19
  modelPath = "MSEAJYTHTH/NFPC"
 
20
  # db_files = ["MSEAJYTHTH/NFPC/index.faiss", "MSEAJYTHTH/NFPC/index.pkl"]
21
 
22
+ index = faiss.read_index('MSEAJYTHTH/NFPC/index.faiss')
23
+
24
 
25
  model_kwargs = {'device':'cpu'}
26
 
 
34
 
35
 
36
  # 두 파일을 업로드한 후에는 다음과 같이 코드를 수정할 수 있습니다.
37
+ db = FAISS.load_local(index, embeddings, allow_dangerous_deserialization=True)
38
 
39
 
40
  def find_best_page_content(question, keywords, db):