File size: 487 Bytes
fd40f81 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | from huggingface_hub import HfApi
api = HfApi()
new_space_id = "FincH12/Automation_Threads_EU"
print("Uploading safe config...")
api.upload_file(
path_or_fileobj="config.py",
path_in_repo="config.py",
repo_id=new_space_id,
repo_type="space",
commit_message="Remove hardcoded API keys for security"
)
print("Config uploaded. Making Space public...")
api.update_repo_settings(repo_id=new_space_id, repo_type="space", private=False)
print("Space is now PUBLIC again.")
|