Spaces:
Running
Running
Update pipeline.py
Browse files- pipeline.py +4 -0
pipeline.py
CHANGED
@@ -551,12 +551,16 @@ def pipeline_with_gemini(accessions,niche_cases=None):
|
|
551 |
download_file_from_drive(lookup_filename, sample_folder_id, structured_lookup_path)
|
552 |
# Read and parse these into `chunk` and `all_output`
|
553 |
else:
|
|
|
554 |
if os.path.exists(faiss_index_path):
|
|
|
555 |
os.remove(faiss_index_path)
|
556 |
if os.path.exists(document_chunks_path):
|
557 |
os.remove(document_chunks_path)
|
558 |
if os.path.exists(structured_lookup_path):
|
559 |
os.remove(structured_lookup_path)
|
|
|
|
|
560 |
download_file_from_drive(faiss_filename, sample_folder_id, faiss_index_path)
|
561 |
download_file_from_drive(chunks_filename, sample_folder_id, document_chunks_path)
|
562 |
download_file_from_drive(lookup_filename, sample_folder_id, structured_lookup_path)
|
|
|
551 |
download_file_from_drive(lookup_filename, sample_folder_id, structured_lookup_path)
|
552 |
# Read and parse these into `chunk` and `all_output`
|
553 |
else:
|
554 |
+
"one of id not exist"
|
555 |
if os.path.exists(faiss_index_path):
|
556 |
+
print("faiss index exist and start to remove: ", faiss_index_path)
|
557 |
os.remove(faiss_index_path)
|
558 |
if os.path.exists(document_chunks_path):
|
559 |
os.remove(document_chunks_path)
|
560 |
if os.path.exists(structured_lookup_path):
|
561 |
os.remove(structured_lookup_path)
|
562 |
+
print("start to download the faiss, chunk, lookup")
|
563 |
+
|
564 |
download_file_from_drive(faiss_filename, sample_folder_id, faiss_index_path)
|
565 |
download_file_from_drive(chunks_filename, sample_folder_id, document_chunks_path)
|
566 |
download_file_from_drive(lookup_filename, sample_folder_id, structured_lookup_path)
|