Complete medical imaging workspace dump (weights, deliverables, papers, notebooks, code, figures)
eded815 verified Download upload_to_hf.py from unknownBrain/BioHCL-SSSM-Complete-Workspace: direct link, hf CLI and curl.
- Browser
- Download file 930 Bytes
-
https://huggingface.co/unknownBrain/BioHCL-SSSM-Complete-Workspace/resolve/main/upload_to_hf.py
- Command line
-
hf download hf://unknownBrain/BioHCL-SSSM-Complete-Workspace/upload_to_hf.py
-
curl -L -o upload_to_hf.py https://huggingface.co/unknownBrain/BioHCL-SSSM-Complete-Workspace/resolve/main/upload_to_hf.py
930 Bytes
| import sys | |
| from huggingface_hub import HfApi, upload_folder | |
| # Force UTF-8 stdout | |
| if sys.stdout.encoding != 'utf-8': | |
| try: | |
| sys.stdout.reconfigure(encoding='utf-8') | |
| except Exception: | |
| pass | |
| api = HfApi() | |
| repo_id = "unknownBrain/BioHCL-SSSM-Pediatric-Pneumonia" | |
| staging_dir = r"C:\Users\Acer\Documents\myproject\medical imaging\hf_repo_staging" | |
| print(f"Creating public repository '{repo_id}' on Hugging Face...") | |
| api.create_repo(repo_id=repo_id, repo_type="model", exist_ok=True, private=False) | |
| print("Repository created / verified.") | |
| print(f"Uploading files from '{staging_dir}' to '{repo_id}'...") | |
| upload_folder( | |
| folder_path=staging_dir, | |
| repo_id=repo_id, | |
| repo_type="model", | |
| commit_message="Initial release: BioHCL-SSSM pre-trained weights, modular code, benchmarks and ablations" | |
| ) | |
| print("\nAll files uploaded successfully to Hugging Face!") | |
| print(f"URL: https://huggingface.co/{repo_id}") | |