Spaces:
Sleeping
Sleeping
Update rss_processor.py
Browse files- rss_processor.py +4 -3
rss_processor.py
CHANGED
@@ -251,10 +251,11 @@ def upload_to_hf_hub():
|
|
251 |
except Exception as e:
|
252 |
logger.error(f"Error uploading to Hugging Face Hub: {e}")
|
253 |
|
254 |
-
|
|
|
|
|
255 |
download_from_hf_hub()
|
256 |
|
257 |
-
global vector_db
|
258 |
vector_db = Chroma(
|
259 |
persist_directory=LOCAL_DB_DIR,
|
260 |
embedding_function=embedding_model,
|
@@ -266,4 +267,4 @@ if __name__ == "__main__":
|
|
266 |
process_and_store_articles(articles)
|
267 |
|
268 |
upload_to_hf_hub()
|
269 |
-
logger.info("
|
|
|
251 |
except Exception as e:
|
252 |
logger.error(f"Error uploading to Hugging Face Hub: {e}")
|
253 |
|
254 |
+
def run_update_pipeline():
|
255 |
+
global vector_db
|
256 |
+
|
257 |
download_from_hf_hub()
|
258 |
|
|
|
259 |
vector_db = Chroma(
|
260 |
persist_directory=LOCAL_DB_DIR,
|
261 |
embedding_function=embedding_model,
|
|
|
267 |
process_and_store_articles(articles)
|
268 |
|
269 |
upload_to_hf_hub()
|
270 |
+
logger.info("Update pipeline finished.")
|