ecb-datasets / setup_instructions.md
seochan99's picture
Upload folder using huggingface_hub
0c545c9 verified
|
Raw History Blame Contribute Delete
2.34 kB

Hugging Face Dataset Upload Guide

1. Hugging Face Token Setup

Method 1: Create Token on Web

  1. Visit https://huggingface.co/settings/tokens
  2. Click "New token"
  3. Enter token name (e.g., "dataset-upload")
  4. Select "Write" permission
  5. Copy the token

Method 2: Set Environment Variable

export HUGGINGFACE_HUB_TOKEN="your_token_here"

Method 3: Use Login Command

python3 -c "from huggingface_hub import login; login()"
# Enter the token when prompted

2. Dataset Upload Methods

Method A: Python Script (Recommended)

cd /Users/chan/ECB/hugging_face/dataset
python3 upload_to_huggingface.py seochan99 ecb-datasets

Method B: Git Usage

cd /Users/chan/ECB/hugging_face/dataset
./upload_to_huggingface.sh seochan99 ecb-datasets

Method C: Web Interface

  1. Go to https://huggingface.co/new-dataset to create new dataset
  2. "Add file" → "Upload files" to upload all files
  3. Click "Commit changes"

3. Post-Upload Verification

  1. Dataset URL Check: https://huggingface.co/datasets/seochan99/ecb-datasets
  2. File Structure Check: Verify all folders and files are uploaded correctly
  3. README.md Check: Ensure dataset description is displayed correctly

4. Dataset Usage

The uploaded dataset can be used as follows:

from datasets import load_dataset

# Load specific dataset configurations
add_attribution = load_dataset("seochan99/ecb-datasets", "add_attribution")
country_swap = load_dataset("seochan99/ecb-datasets", "country_swap")
multi_loop_edits = load_dataset("seochan99/ecb-datasets", "multi_loop_edits")

5. Troubleshooting

Token-related Errors

  • Verify token is correct
  • Ensure token has "Write" permission

Upload Failures

  • Check internet connection
  • Verify file size limits (Hugging Face has 5GB limit per file)
  • Check permissions

Git-related Errors

  • Ensure Git is installed
  • Verify Hugging Face account is correct

6. Dataset Information

  • Dataset Name: ECB Datasets: Cultural Bias Evaluation in Generative Image Models
  • Related Paper: "Exposing Blindspots: Cultural Bias Evaluation in Generative Image Models"
  • ECB Meaning: Evaluation Cultural Bias
  • Models: Flux, HiDream, NextStep, Qwen, SD35
  • Countries: Korea, China, India, Kenya, Nigeria, United States