Datasets:
Hugging Face Dataset Upload Instructions
Prerequisites
- Install Hugging Face Hub:
pip install huggingface_hub
- Login to Hugging Face:
huggingface-cli login
Enter your Hugging Face token when prompted.
Upload Steps
Option 1: Using Hugging Face Hub (Recommended)
# 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
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
- Go to https://huggingface.co/new-dataset
- Create a new dataset repository:
breast-cancer-african-adjusted - Upload files through the web interface:
README.md(dataset card)breast_cancer_african_adjusted.csvbreast_cancer_original.csvdataset_infos.jsonbreast_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
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
USERNAMEwith 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