# Hugging Face Dataset Upload Instructions ## Prerequisites 1. **Install Hugging Face Hub**: ```bash pip install huggingface_hub ``` 2. **Login to Hugging Face**: ```bash huggingface-cli login ``` Enter your Hugging Face token when prompted. ## Upload Steps ### Option 1: Using Hugging Face Hub (Recommended) ```bash # Navigate to the dataset folder cd huggingface_dataset # Initialize git repository git init git add . git commit -m "Initial commit: African physiognomy-adjusted breast cancer dataset" # Add Hugging Face remote (replace USERNAME with your HF username) git remote add origin https://huggingface.co/datasets/USERNAME/breast-cancer-african-adjusted # Push to Hugging Face git push -u origin main ``` ### Option 2: Using Python Script ```python from huggingface_hub import HfApi, upload_folder api = HfApi() # Upload the entire folder api.upload_folder( folder_path="huggingface_dataset", repo_id="USERNAME/breast-cancer-african-adjusted", # Replace USERNAME repo_type="dataset", commit_message="Upload African physiognomy-adjusted breast cancer dataset" ) ``` ### Option 3: Web Interface 1. Go to https://huggingface.co/new-dataset 2. Create a new dataset repository: `breast-cancer-african-adjusted` 3. Upload files through the web interface: - `README.md` (dataset card) - `breast_cancer_african_adjusted.csv` - `breast_cancer_original.csv` - `dataset_infos.json` - `breast_cancer_african_adjusted.py` - `.gitattributes` ## Dataset Repository Structure ``` USERNAME/breast-cancer-african-adjusted/ ├── README.md # Dataset card with metadata ├── breast_cancer_african_adjusted.csv # Main adjusted dataset ├── breast_cancer_original.csv # Original Wisconsin dataset ├── dataset_infos.json # Dataset configuration ├── breast_cancer_african_adjusted.py # Loading script └── .gitattributes # Git LFS configuration ``` ## Post-Upload Checklist - [ ] Verify dataset loads correctly: `load_dataset("USERNAME/breast-cancer-african-adjusted")` - [ ] Check dataset card displays properly on Hugging Face - [ ] Test both "african_adjusted" and "original" configurations - [ ] Add appropriate tags and categories - [ ] Set proper license (CC BY 4.0) - [ ] Add to relevant collections (medical, healthcare-bias, etc.) ## Usage After Upload ```python from datasets import load_dataset # Load African-adjusted version (default) dataset = load_dataset("USERNAME/breast-cancer-african-adjusted") # Load original version original_dataset = load_dataset("USERNAME/breast-cancer-african-adjusted", "original") # Access the data data = dataset['train'] print(f"Dataset size: {len(data)}") print(f"Features: {data.features}") ``` ## Notes - Replace `USERNAME` with your actual Hugging Face username - Ensure you have the necessary permissions to upload datasets - The dataset will be publicly available under CC BY 4.0 license - Consider adding the dataset to relevant Hugging Face collections for discoverability