Cleanup: Remove local Gradio cache directories (.config, .gradio)
Browse files- GITHUB_SETUP.md +0 -91
GITHUB_SETUP.md
DELETED
|
@@ -1,91 +0,0 @@
|
|
| 1 |
-
# GitHub Integration Setup Guide
|
| 2 |
-
|
| 3 |
-
## β
What's Already Prepared
|
| 4 |
-
|
| 5 |
-
1. **GitHub Actions Workflow** (`.github/workflows/sync-to-hf.yml`)
|
| 6 |
-
- Automatically syncs to Hugging Face Space on every push to `main`
|
| 7 |
-
- Can be triggered manually via GitHub Actions UI
|
| 8 |
-
|
| 9 |
-
2. **Setup Script** (`setup_github_sync.sh`)
|
| 10 |
-
- Helper script to add GitHub remote
|
| 11 |
-
- Configures dual-push setup
|
| 12 |
-
|
| 13 |
-
## π Steps to Complete Setup
|
| 14 |
-
|
| 15 |
-
### Step 1: Create GitHub Repository
|
| 16 |
-
1. Go to https://github.com/new
|
| 17 |
-
2. Repository name: `NeuroSAM3` (or your preferred name)
|
| 18 |
-
3. Description: "Medical Image Segmentation using SAM 3"
|
| 19 |
-
4. Choose Public or Private
|
| 20 |
-
5. **Don't** initialize with README, .gitignore, or license (we already have these)
|
| 21 |
-
6. Click "Create repository"
|
| 22 |
-
|
| 23 |
-
### Step 2: Add GitHub Remote
|
| 24 |
-
Once you have the GitHub repository URL, run:
|
| 25 |
-
|
| 26 |
-
```bash
|
| 27 |
-
cd /Users/matheusrech/colab/NeuroSAM3
|
| 28 |
-
./setup_github_sync.sh https://github.com/YOUR_USERNAME/NeuroSAM3.git
|
| 29 |
-
```
|
| 30 |
-
|
| 31 |
-
Or manually:
|
| 32 |
-
```bash
|
| 33 |
-
git remote add github https://github.com/YOUR_USERNAME/NeuroSAM3.git
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
### Step 3: Push to GitHub
|
| 37 |
-
```bash
|
| 38 |
-
git push github main
|
| 39 |
-
```
|
| 40 |
-
|
| 41 |
-
### Step 4: Set Up GitHub Actions Secret
|
| 42 |
-
1. Go to your GitHub repository: `https://github.com/YOUR_USERNAME/NeuroSAM3`
|
| 43 |
-
2. Navigate to: **Settings** β **Secrets and variables** β **Actions**
|
| 44 |
-
3. Click **New repository secret**
|
| 45 |
-
4. Name: `HF_TOKEN`
|
| 46 |
-
5. Value: Your Hugging Face token (get it from https://huggingface.co/settings/tokens)
|
| 47 |
-
6. Click **Add secret**
|
| 48 |
-
|
| 49 |
-
### Step 5: Verify GitHub Actions
|
| 50 |
-
1. Go to **Actions** tab in your GitHub repository
|
| 51 |
-
2. You should see the workflow run after pushing
|
| 52 |
-
3. Check that it successfully pushes to Hugging Face Space
|
| 53 |
-
|
| 54 |
-
## π How It Works
|
| 55 |
-
|
| 56 |
-
### Automatic Sync
|
| 57 |
-
- Every push to `main` branch on GitHub triggers the workflow
|
| 58 |
-
- Workflow automatically pushes to Hugging Face Space
|
| 59 |
-
- Your Space stays in sync with GitHub automatically
|
| 60 |
-
|
| 61 |
-
### Manual Push (Both Remotes)
|
| 62 |
-
```bash
|
| 63 |
-
# Push to both remotes
|
| 64 |
-
git push origin main # Hugging Face Space
|
| 65 |
-
git push github main # GitHub
|
| 66 |
-
|
| 67 |
-
# Or use the alias (after setup):
|
| 68 |
-
git pushall
|
| 69 |
-
```
|
| 70 |
-
|
| 71 |
-
### Push to GitHub Only
|
| 72 |
-
```bash
|
| 73 |
-
git push github main
|
| 74 |
-
# GitHub Actions will automatically sync to Hugging Face
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
## π Current Remotes
|
| 78 |
-
|
| 79 |
-
After setup, you'll have:
|
| 80 |
-
- `origin` β Hugging Face Space (`https://huggingface.co/spaces/mmrech/NeuroSAM3`)
|
| 81 |
-
- `github` β GitHub repository (`https://github.com/YOUR_USERNAME/NeuroSAM3`)
|
| 82 |
-
|
| 83 |
-
## β
Verification
|
| 84 |
-
|
| 85 |
-
After setup, verify with:
|
| 86 |
-
```bash
|
| 87 |
-
git remote -v
|
| 88 |
-
```
|
| 89 |
-
|
| 90 |
-
You should see both remotes configured.
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|