File size: 2,322 Bytes
9537200
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Hugging Face Integration Setup

This guide covers different methods to sync this repository with Hugging Face Hub.

## Repository

- **HF Repo**: [shk-bd/Sheikh-Freemium](https://huggingface.co/shk-bd/Sheikh-Freemium)
- **Type**: Model (can also be used as dataset)

## Method 1: Python SDK (Recommended)

```python
from huggingface_hub import login, upload_folder

# Login with your Hugging Face credentials
login()

# Push your model files
upload_folder(
    folder_path=".",
    repo_id="shk-bd/Sheikh-Freemium",
    repo_type="model"
)
```

Or use the provided script:

```bash
pip install huggingface_hub
python scripts/upload_to_hf.py
```

## Method 2: Git-Xet (Large Files)

For repositories with large files (>10GB), use git-xet:

```bash
# Install git-xet
# See: https://hf.co/docs/hub/git-xet
git xet install

# Add HuggingFace remote
git remote add hf git@hf.co:shk-bd/Sheikh-Freemium

# Push (requires SSH key in HF settings)
git push -u hf main
```

### SSH Key Setup

1. Generate SSH key: `ssh-keygen -t ed25519`
2. Add to HuggingFace: https://huggingface.co/settings/keys

## Method 3: Hugging Face CLI

```bash
# Install CLI
curl -LsSf https://hf.co/cli/install.sh | bash

# Login
hf auth login

# Upload
hf upload shk-bd/Sheikh-Freemium .
```

Or use the provided script:

```bash
./scripts/sync_hf.sh model  # or 'dataset'
```

## Method 4: GitHub Actions (Automated)

The repository includes automated sync via GitHub Actions.

### Setup

1. Add `HF_TOKEN` secret to GitHub repository:
   - Go to **Settings****Secrets and variables****Actions**
   - Add secret named `HF_TOKEN` with your HuggingFace token

2. Trigger sync:
   - **Automatic**: Push to `main` branch (dataset/ or scripts/ changes)
   - **Manual**: Go to Actions → "Sync to Hugging Face" → Run workflow

### Get Your Token

1. Go to https://huggingface.co/settings/tokens
2. Create new token with `write` access
3. Copy and add as GitHub secret

## Verification

After upload, verify at:
- https://huggingface.co/shk-bd/Sheikh-Freemium

## Troubleshooting

| Issue | Solution |
|-------|----------|
| "Repository not found" | Ensure repo exists on HF or create it first |
| "Permission denied" | Check token has write access |
| Large file errors | Use git-xet or Git LFS |
| SSH errors | Verify SSH key in HF settings |