gapura-ai / scripts /cleanup_space.py
Muhammad Ridzki Nugraha
Upload folder using huggingface_hub
c32f8fb verified
raw
history blame contribute delete
522 Bytes
import os
from huggingface_hub import HfApi
def cleanup():
token = os.environ.get("HF_TOKEN")
if not token:
print("HF_TOKEN not found")
return
api = HfApi(token=token)
repo_id = "ridzki-nrzngr/gapura-ai"
try:
print(f"Deleting repo {repo_id}...")
api.delete_repo(repo_id=repo_id, repo_type="space")
print(f"Deleted repo {repo_id}")
except Exception as e:
print(f"Failed to delete repo {repo_id}: {e}")
if __name__ == "__main__":
cleanup()