| from huggingface_hub import create_repo, upload_folder | |
| import os | |
| ORG_REPO = "basimazam/safe-diffusion-guidance" | |
| def main(): | |
| create_repo(ORG_REPO, repo_type="model", exist_ok=True) | |
| upload_folder( | |
| repo_id=ORG_REPO, | |
| folder_path=".", # current folder | |
| repo_type="model", | |
| ignore_patterns=[".git/*", "outputs/*", "tests/*__pycache__*"] | |
| ) | |
| print(f"Uploaded to https://huggingface.co/{ORG_REPO}") | |
| if __name__ == "__main__": | |
| assert os.path.exists("safe_diffusion_guidance.py") | |
| main() | |