Download update_config.py from FincH12/Automation_Threads_EU: direct link, hf CLI and curl.
- Browser
- Download file 487 Bytes
-
https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/update_config.py
- Command line
-
hf download hf://spaces/FincH12/Automation_Threads_EU/update_config.py
-
curl -L -o update_config.py https://huggingface.co/spaces/FincH12/Automation_Threads_EU/resolve/main/update_config.py
487 Bytes
| 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.") | |