# Hugging Face Setup Guide ## 🔐 Setting Up Hugging Face Authentication ### 1. Get Your HF Token - Go to https://huggingface.co/settings/tokens - Create a new token with **Write** permissions - Copy the token (starts with `hf_...`) ### 2. Set Environment Variables #### Option A: In Hugging Face Spaces (Recommended) 1. Go to your Space settings 2. Add these secrets: - `HF_TOKEN`: Your Hugging Face token - `HF_USERNAME`: Your Hugging Face username (e.g., "Stylique") #### Option B: Local Development ```bash export HF_TOKEN="hf_your_token_here" export HF_USERNAME="your_username" ``` ### 3. Verify Setup ```bash source setup_hf.sh ``` ## 🚀 What Happens Next Once environment variables are set, the system will automatically: - ✅ Authenticate with Hugging Face - ✅ Upload trained models to `{HF_USERNAME}/dressify-models` - ✅ Upload datasets to `{HF_USERNAME}/Dressify-Helper` - ✅ Create repositories if they don't exist ## 🔒 Security Notes - **Never commit tokens to git** - **Use environment variables or HF Spaces secrets** - **Tokens are automatically masked in logs** ## 📁 Repository Structure After successful upload: ``` {HF_USERNAME}/dressify-models/ ├── resnet_item_embedder_best.pth ├── vit_outfit_model_best.pth ├── resnet_metrics.json └── vit_metrics.json {HF_USERNAME}/Dressify-Helper/ ├── train.json ├── valid.json ├── test.json ├── outfit_triplets_train.json ├── outfit_triplets_valid.json └── outfit_triplets_test.json ```