Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def create_faiss_index(isco_taxonomy, model_name='BAAI/bge-m3'):
|
|
25 |
index = faiss.IndexFlatL2(dimension)
|
26 |
index.add(embeddings)
|
27 |
faiss.write_index(index, '/data/isco_taxonomy.index')
|
28 |
-
with open('isco_taxonomy_mapping.json', 'w') as f:
|
29 |
json.dump({i: entry for i, entry in enumerate(isco_taxonomy)}, f)
|
30 |
|
31 |
# Define a function to retrieve and rerank using FAISS
|
|
|
25 |
index = faiss.IndexFlatL2(dimension)
|
26 |
index.add(embeddings)
|
27 |
faiss.write_index(index, '/data/isco_taxonomy.index')
|
28 |
+
with open('/data/isco_taxonomy_mapping.json', 'w') as f:
|
29 |
json.dump({i: entry for i, entry in enumerate(isco_taxonomy)}, f)
|
30 |
|
31 |
# Define a function to retrieve and rerank using FAISS
|