wakeupmh commited on
Commit
db03170
·
1 Parent(s): 13a46cd

fix: adjust file name

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -27,14 +27,12 @@ def fetch_arxiv_papers(query, max_results=5):
27
  def load_faiss_index(index_file="faiss_index.index"):
28
  import os
29
  if not os.path.exists(index_file):
30
- st.warning("FAISS index not found. Building index from scratch...")
31
  # Import the build function from the other file
32
- import faiss_index_index
33
 
34
  # Fetch some initial papers to build the index
35
  initial_papers = faiss_index_index.fetch_arxiv_papers("autism research", max_results=100)
36
  faiss_index_index.build_faiss_index(initial_papers, index_file)
37
- st.success("FAISS index built successfully!")
38
 
39
  return faiss.read_index(index_file)
40
 
 
27
  def load_faiss_index(index_file="faiss_index.index"):
28
  import os
29
  if not os.path.exists(index_file):
 
30
  # Import the build function from the other file
31
+ import faiss_index.index as faiss_index_index
32
 
33
  # Fetch some initial papers to build the index
34
  initial_papers = faiss_index_index.fetch_arxiv_papers("autism research", max_results=100)
35
  faiss_index_index.build_faiss_index(initial_papers, index_file)
 
36
 
37
  return faiss.read_index(index_file)
38