HackathonSpaceRecommender / scripts /update_spaces_cache.py
tejasashinde's picture
Integrate HF Bucket storage
4784470
Raw
History Blame Contribute Delete
385 Bytes
from __future__ import annotations
from backend.storage import init_db
from backend.spaces_index import get_index_stats, refresh_spaces
def main() -> None:
init_db()
spaces = refresh_spaces()
stats = get_index_stats()
print(f"Saved {len(spaces)} Spaces and synced likes to the bucket-backed SQLite database")
print(stats)
if __name__ == "__main__":
main()