danieldux commited on
Commit
6ee9bbb
1 Parent(s): d4ab304

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -31,9 +31,9 @@ def create_faiss_index(isco_taxonomy, model_name='BAAI/bge-m3'):
31
  # Define a function to retrieve and rerank using FAISS
32
  def retrieve_and_rerank_faiss(job_duties, model_name="BAAI/bge-m3", top_k=4):
33
  # Check if isco_taxonomy.index exists, if not, create it with create_faiss_index
34
- if not os.path.exists("/data/isco_taxonomy.index"):
35
- isco_taxonomy = load_isco_taxonomy('isco_taxonomy.jsonl')
36
- create_faiss_index(isco_taxonomy)
37
  index = faiss.read_index("/data/isco_taxonomy.index")
38
  with open("/data/isco_taxonomy_mapping.json", "r") as f:
39
  isco_taxonomy = json.load(f)
 
31
  # Define a function to retrieve and rerank using FAISS
32
  def retrieve_and_rerank_faiss(job_duties, model_name="BAAI/bge-m3", top_k=4):
33
  # Check if isco_taxonomy.index exists, if not, create it with create_faiss_index
34
+ # if not os.path.exists("/data/isco_taxonomy.index"):
35
+ isco_taxonomy = load_isco_taxonomy('isco_taxonomy.jsonl')
36
+ create_faiss_index(isco_taxonomy)
37
  index = faiss.read_index("/data/isco_taxonomy.index")
38
  with open("/data/isco_taxonomy_mapping.json", "r") as f:
39
  isco_taxonomy = json.load(f)