Clean up: Remove unnecessary guide files, keep only essential model files
Browse files- CHECKLIST.md +0 -185
- QUICK_START.md +0 -87
- UPLOAD_GUIDE.md +0 -208
- model_card_metadata.yml +0 -52
- upload.sh +0 -73
CHECKLIST.md
DELETED
|
@@ -1,185 +0,0 @@
|
|
| 1 |
-
# Pre-Upload Checklist โ
|
| 2 |
-
|
| 3 |
-
## Before You Upload
|
| 4 |
-
|
| 5 |
-
### 1. Files Ready
|
| 6 |
-
- [x] README.md (comprehensive model card)
|
| 7 |
-
- [x] config.json (model configuration)
|
| 8 |
-
- [x] requirements.txt (dependencies)
|
| 9 |
-
- [x] inference.py (inference script)
|
| 10 |
-
- [x] example_usage.py (usage examples)
|
| 11 |
-
- [x] .gitattributes (Git LFS config)
|
| 12 |
-
- [x] best_model_finetuned.pth (main model - 43MB)
|
| 13 |
-
- [x] best_model_simple.pth (alternative model - 2.4MB)
|
| 14 |
-
- [x] Marine 1.mlmodel (CoreML model - 13KB)
|
| 15 |
-
|
| 16 |
-
### 2. Prerequisites Installed
|
| 17 |
-
- [ ] Hugging Face CLI: `pip install huggingface_hub`
|
| 18 |
-
- [ ] Git LFS: `brew install git-lfs` (macOS) or `sudo apt-get install git-lfs` (Linux)
|
| 19 |
-
- [ ] Git LFS initialized: `git lfs install`
|
| 20 |
-
|
| 21 |
-
### 3. Authentication
|
| 22 |
-
- [ ] Hugging Face account created at https://huggingface.co
|
| 23 |
-
- [ ] Access token generated at https://huggingface.co/settings/tokens
|
| 24 |
-
- [ ] Logged in: `huggingface-cli login`
|
| 25 |
-
- [ ] Verify login: `huggingface-cli whoami`
|
| 26 |
-
|
| 27 |
-
### 4. Repository Setup
|
| 28 |
-
- [ ] Repository created at https://huggingface.co/new
|
| 29 |
-
- [ ] Repository name: `shiv207/Marine1`
|
| 30 |
-
- [ ] Repository type: Model
|
| 31 |
-
- [ ] License: MIT
|
| 32 |
-
|
| 33 |
-
### 5. Testing
|
| 34 |
-
- [ ] Test inference script locally:
|
| 35 |
-
```bash
|
| 36 |
-
cd huggingface
|
| 37 |
-
python inference.py best_model_finetuned.pth ../path/to/test/audio.wav
|
| 38 |
-
```
|
| 39 |
-
- [ ] Verify all model files load correctly
|
| 40 |
-
- [ ] Check file sizes are reasonable
|
| 41 |
-
|
| 42 |
-
### 6. Documentation Quality
|
| 43 |
-
- [ ] README has clear description
|
| 44 |
-
- [ ] Usage examples are included
|
| 45 |
-
- [ ] Limitations are documented
|
| 46 |
-
- [ ] Citation information is provided
|
| 47 |
-
- [ ] Contact information is included
|
| 48 |
-
- [ ] License is specified
|
| 49 |
-
|
| 50 |
-
## Upload Methods
|
| 51 |
-
|
| 52 |
-
### Method 1: Quick Upload (Recommended for First Time)
|
| 53 |
-
```bash
|
| 54 |
-
cd huggingface
|
| 55 |
-
./upload.sh
|
| 56 |
-
```
|
| 57 |
-
|
| 58 |
-
### Method 2: Manual CLI Upload
|
| 59 |
-
```bash
|
| 60 |
-
cd huggingface
|
| 61 |
-
huggingface-cli upload shiv207/Marine1 . --repo-type model
|
| 62 |
-
```
|
| 63 |
-
|
| 64 |
-
### Method 3: Git Method (More Control)
|
| 65 |
-
```bash
|
| 66 |
-
# Clone repository
|
| 67 |
-
git clone https://huggingface.co/shiv207/Marine1
|
| 68 |
-
cd Marine1
|
| 69 |
-
|
| 70 |
-
# Copy files
|
| 71 |
-
cp ../huggingface/* .
|
| 72 |
-
|
| 73 |
-
# Setup Git LFS
|
| 74 |
-
git lfs track "*.pth"
|
| 75 |
-
git lfs track "*.mlmodel"
|
| 76 |
-
|
| 77 |
-
# Commit and push
|
| 78 |
-
git add .
|
| 79 |
-
git commit -m "Initial upload: Marine1 Underwater Acoustic Classifier"
|
| 80 |
-
git push
|
| 81 |
-
```
|
| 82 |
-
|
| 83 |
-
## After Upload
|
| 84 |
-
|
| 85 |
-
### Immediate Checks
|
| 86 |
-
- [ ] Visit https://huggingface.co/shiv207/Marine1
|
| 87 |
-
- [ ] Verify README renders correctly
|
| 88 |
-
- [ ] Check all files are uploaded
|
| 89 |
-
- [ ] Verify file sizes (should show actual size, not pointer)
|
| 90 |
-
- [ ] Test model download:
|
| 91 |
-
```python
|
| 92 |
-
from huggingface_hub import hf_hub_download
|
| 93 |
-
model_path = hf_hub_download(repo_id="shiv207/Marine1", filename="best_model_finetuned.pth")
|
| 94 |
-
```
|
| 95 |
-
|
| 96 |
-
### Repository Settings
|
| 97 |
-
- [ ] Set visibility to Public
|
| 98 |
-
- [ ] Verify license is MIT
|
| 99 |
-
- [ ] Check tags are correct
|
| 100 |
-
- [ ] Add repository description
|
| 101 |
-
- [ ] Add topics/keywords
|
| 102 |
-
|
| 103 |
-
### Documentation
|
| 104 |
-
- [ ] README displays properly
|
| 105 |
-
- [ ] Code blocks are formatted
|
| 106 |
-
- [ ] Links work correctly
|
| 107 |
-
- [ ] Images load (if any)
|
| 108 |
-
- [ ] Metadata is parsed correctly
|
| 109 |
-
|
| 110 |
-
### Testing
|
| 111 |
-
- [ ] Download model using HF Hub
|
| 112 |
-
- [ ] Run inference with downloaded model
|
| 113 |
-
- [ ] Verify predictions are correct
|
| 114 |
-
- [ ] Test on different audio files
|
| 115 |
-
|
| 116 |
-
## Promotion (Optional)
|
| 117 |
-
|
| 118 |
-
### Share Your Model
|
| 119 |
-
- [ ] Tweet about it with #HuggingFace #MarineAI #UnderwaterAcoustics
|
| 120 |
-
- [ ] Post on LinkedIn
|
| 121 |
-
- [ ] Share in Hugging Face Discord
|
| 122 |
-
- [ ] Add to your GitHub README
|
| 123 |
-
- [ ] Post in relevant Reddit communities (r/MachineLearning, r/oceanography)
|
| 124 |
-
|
| 125 |
-
### Documentation
|
| 126 |
-
- [ ] Write a blog post on Hugging Face
|
| 127 |
-
- [ ] Create a demo video
|
| 128 |
-
- [ ] Add to Papers with Code (if applicable)
|
| 129 |
-
- [ ] Update your portfolio/website
|
| 130 |
-
|
| 131 |
-
### Community
|
| 132 |
-
- [ ] Respond to issues and questions
|
| 133 |
-
- [ ] Accept pull requests for improvements
|
| 134 |
-
- [ ] Update model based on feedback
|
| 135 |
-
- [ ] Add more examples and tutorials
|
| 136 |
-
|
| 137 |
-
## Troubleshooting
|
| 138 |
-
|
| 139 |
-
### Common Issues
|
| 140 |
-
|
| 141 |
-
**Large File Upload Fails**
|
| 142 |
-
```bash
|
| 143 |
-
git lfs track "*.pth"
|
| 144 |
-
git add .gitattributes
|
| 145 |
-
git add *.pth
|
| 146 |
-
git commit --amend
|
| 147 |
-
git push --force
|
| 148 |
-
```
|
| 149 |
-
|
| 150 |
-
**Authentication Error**
|
| 151 |
-
```bash
|
| 152 |
-
huggingface-cli logout
|
| 153 |
-
huggingface-cli login
|
| 154 |
-
```
|
| 155 |
-
|
| 156 |
-
**Model Not Found After Upload**
|
| 157 |
-
- Wait a few minutes for processing
|
| 158 |
-
- Check repository visibility settings
|
| 159 |
-
- Verify file was uploaded (not just LFS pointer)
|
| 160 |
-
|
| 161 |
-
**README Not Rendering**
|
| 162 |
-
- Check YAML frontmatter syntax
|
| 163 |
-
- Verify markdown formatting
|
| 164 |
-
- Look for special characters that need escaping
|
| 165 |
-
|
| 166 |
-
## Support Resources
|
| 167 |
-
|
| 168 |
-
- Hugging Face Docs: https://huggingface.co/docs
|
| 169 |
-
- Model Hub Guide: https://huggingface.co/docs/hub/models
|
| 170 |
-
- Git LFS Guide: https://git-lfs.github.com
|
| 171 |
-
- Community Forum: https://discuss.huggingface.co
|
| 172 |
-
- Discord: https://hf.co/join/discord
|
| 173 |
-
|
| 174 |
-
## Final Notes
|
| 175 |
-
|
| 176 |
-
- First upload may take 10-15 minutes depending on file sizes
|
| 177 |
-
- Model will be publicly accessible immediately after upload
|
| 178 |
-
- You can update files anytime using the same upload commands
|
| 179 |
-
- Consider adding a demo Space later for interactive testing
|
| 180 |
-
|
| 181 |
-
---
|
| 182 |
-
|
| 183 |
-
**Ready to upload?** Run `./upload.sh` from the huggingface directory!
|
| 184 |
-
|
| 185 |
-
Good luck with your first Hugging Face model! ๐๐
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QUICK_START.md
DELETED
|
@@ -1,87 +0,0 @@
|
|
| 1 |
-
# Quick Start Guide ๐
|
| 2 |
-
|
| 3 |
-
## Upload in 3 Steps
|
| 4 |
-
|
| 5 |
-
### Step 1: Install & Login
|
| 6 |
-
```bash
|
| 7 |
-
# Install Hugging Face CLI
|
| 8 |
-
pip install huggingface_hub
|
| 9 |
-
|
| 10 |
-
# Install Git LFS (for large files)
|
| 11 |
-
brew install git-lfs # macOS
|
| 12 |
-
# or: sudo apt-get install git-lfs # Linux
|
| 13 |
-
|
| 14 |
-
# Initialize Git LFS
|
| 15 |
-
git lfs install
|
| 16 |
-
|
| 17 |
-
# Login to Hugging Face
|
| 18 |
-
huggingface-cli login
|
| 19 |
-
# Paste your token from: https://huggingface.co/settings/tokens
|
| 20 |
-
```
|
| 21 |
-
|
| 22 |
-
### Step 2: Create Repository
|
| 23 |
-
1. Go to https://huggingface.co/new
|
| 24 |
-
2. Repository name: `Marine1`
|
| 25 |
-
3. Owner: `shiv207`
|
| 26 |
-
4. Type: Model
|
| 27 |
-
5. License: MIT
|
| 28 |
-
6. Click "Create model"
|
| 29 |
-
|
| 30 |
-
### Step 3: Upload
|
| 31 |
-
```bash
|
| 32 |
-
cd huggingface
|
| 33 |
-
./upload.sh
|
| 34 |
-
```
|
| 35 |
-
|
| 36 |
-
That's it! Your model will be live at: https://huggingface.co/shiv207/Marine1
|
| 37 |
-
|
| 38 |
-
## What Gets Uploaded
|
| 39 |
-
|
| 40 |
-
โ
**3 Model Files:**
|
| 41 |
-
- `best_model_finetuned.pth` - Fine-tuned ResNet18 (98.33% accuracy) - 43MB
|
| 42 |
-
- `best_model_simple.pth` - Simple CNN (93% accuracy) - 2.4MB
|
| 43 |
-
- `Marine 1.mlmodel` - CoreML for iOS/macOS - 13KB
|
| 44 |
-
|
| 45 |
-
โ
**Documentation:**
|
| 46 |
-
- `README.md` - Comprehensive model card
|
| 47 |
-
- `config.json` - Model configuration
|
| 48 |
-
- `requirements.txt` - Dependencies
|
| 49 |
-
|
| 50 |
-
โ
**Code Examples:**
|
| 51 |
-
- `inference.py` - Ready-to-use inference script
|
| 52 |
-
- `example_usage.py` - Usage examples
|
| 53 |
-
|
| 54 |
-
## After Upload
|
| 55 |
-
|
| 56 |
-
### Test Your Model
|
| 57 |
-
```python
|
| 58 |
-
from huggingface_hub import hf_hub_download
|
| 59 |
-
|
| 60 |
-
# Download model
|
| 61 |
-
model_path = hf_hub_download(
|
| 62 |
-
repo_id="shiv207/Marine1",
|
| 63 |
-
filename="best_model_finetuned.pth"
|
| 64 |
-
)
|
| 65 |
-
|
| 66 |
-
# Use it
|
| 67 |
-
from inference import Marine1Classifier
|
| 68 |
-
classifier = Marine1Classifier(model_path)
|
| 69 |
-
result = classifier.predict("audio.wav")
|
| 70 |
-
print(result)
|
| 71 |
-
```
|
| 72 |
-
|
| 73 |
-
### Share It
|
| 74 |
-
- Tweet: "Just uploaded my first model to @huggingface! ๐ Marine1 classifies underwater sounds with 98% accuracy. Check it out: https://huggingface.co/shiv207/Marine1 #MachineLearning #MarineAI"
|
| 75 |
-
- LinkedIn: Share your achievement
|
| 76 |
-
- GitHub: Add badge to README
|
| 77 |
-
|
| 78 |
-
## Need Help?
|
| 79 |
-
|
| 80 |
-
- ๐ Full guide: See `UPLOAD_GUIDE.md`
|
| 81 |
-
- โ
Checklist: See `CHECKLIST.md`
|
| 82 |
-
- ๐ฌ Questions: https://discuss.huggingface.co
|
| 83 |
-
- ๐ Issues: https://github.com/shiv207/underwater-audio-classifier/issues
|
| 84 |
-
|
| 85 |
-
---
|
| 86 |
-
|
| 87 |
-
**Ready?** Just run `./upload.sh` and you're done! ๐
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UPLOAD_GUIDE.md
DELETED
|
@@ -1,208 +0,0 @@
|
|
| 1 |
-
# Hugging Face Upload Guide for Marine1 ๐
|
| 2 |
-
|
| 3 |
-
## Prerequisites
|
| 4 |
-
|
| 5 |
-
1. **Install Hugging Face CLI**
|
| 6 |
-
```bash
|
| 7 |
-
pip install huggingface_hub
|
| 8 |
-
```
|
| 9 |
-
|
| 10 |
-
2. **Login to Hugging Face**
|
| 11 |
-
```bash
|
| 12 |
-
huggingface-cli login
|
| 13 |
-
```
|
| 14 |
-
Enter your Hugging Face token when prompted. Get your token from: https://huggingface.co/settings/tokens
|
| 15 |
-
|
| 16 |
-
3. **Install Git LFS** (for large files)
|
| 17 |
-
```bash
|
| 18 |
-
# macOS
|
| 19 |
-
brew install git-lfs
|
| 20 |
-
|
| 21 |
-
# Ubuntu/Debian
|
| 22 |
-
sudo apt-get install git-lfs
|
| 23 |
-
|
| 24 |
-
# Initialize Git LFS
|
| 25 |
-
git lfs install
|
| 26 |
-
```
|
| 27 |
-
|
| 28 |
-
## Upload Steps
|
| 29 |
-
|
| 30 |
-
### Option 1: Using Hugging Face CLI (Recommended)
|
| 31 |
-
|
| 32 |
-
```bash
|
| 33 |
-
# Navigate to the huggingface directory
|
| 34 |
-
cd huggingface
|
| 35 |
-
|
| 36 |
-
# Upload all files to your model repository
|
| 37 |
-
huggingface-cli upload shiv207/Marine1 . --repo-type model
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
### Option 2: Using Git (More Control)
|
| 41 |
-
|
| 42 |
-
```bash
|
| 43 |
-
# Clone your model repository (create it first on huggingface.co)
|
| 44 |
-
git clone https://huggingface.co/shiv207/Marine1
|
| 45 |
-
cd Marine1
|
| 46 |
-
|
| 47 |
-
# Copy all files from the huggingface directory
|
| 48 |
-
cp ../huggingface/* .
|
| 49 |
-
|
| 50 |
-
# Track large files with Git LFS
|
| 51 |
-
git lfs track "*.pth"
|
| 52 |
-
git lfs track "*.mlmodel"
|
| 53 |
-
|
| 54 |
-
# Add and commit files
|
| 55 |
-
git add .
|
| 56 |
-
git commit -m "Initial upload: Marine1 Underwater Acoustic Classifier"
|
| 57 |
-
|
| 58 |
-
# Push to Hugging Face
|
| 59 |
-
git push
|
| 60 |
-
```
|
| 61 |
-
|
| 62 |
-
### Option 3: Using Python API
|
| 63 |
-
|
| 64 |
-
```python
|
| 65 |
-
from huggingface_hub import HfApi
|
| 66 |
-
|
| 67 |
-
api = HfApi()
|
| 68 |
-
|
| 69 |
-
# Upload all files
|
| 70 |
-
api.upload_folder(
|
| 71 |
-
folder_path="./huggingface",
|
| 72 |
-
repo_id="shiv207/Marine1",
|
| 73 |
-
repo_type="model",
|
| 74 |
-
)
|
| 75 |
-
```
|
| 76 |
-
|
| 77 |
-
## Files to Upload
|
| 78 |
-
|
| 79 |
-
Make sure these files are in your huggingface directory:
|
| 80 |
-
|
| 81 |
-
- โ
`README.md` - Model card with documentation
|
| 82 |
-
- โ
`config.json` - Model configuration
|
| 83 |
-
- โ
`requirements.txt` - Dependencies
|
| 84 |
-
- โ
`inference.py` - Example inference script
|
| 85 |
-
- โ
`.gitattributes` - Git LFS configuration
|
| 86 |
-
- โ
`best_model_finetuned.pth` - Fine-tuned model (98.33% accuracy)
|
| 87 |
-
- โ
`best_model_simple.pth` - Simple CNN model (93% accuracy)
|
| 88 |
-
- โ
`Marine 1.mlmodel` - CoreML model for iOS/macOS
|
| 89 |
-
|
| 90 |
-
## Before Uploading
|
| 91 |
-
|
| 92 |
-
1. **Copy model files to huggingface directory:**
|
| 93 |
-
```bash
|
| 94 |
-
cp models/best_model_finetuned.pth huggingface/
|
| 95 |
-
cp models/best_model_simple.pth huggingface/
|
| 96 |
-
cp models/Marine\ 1.mlmodel huggingface/
|
| 97 |
-
```
|
| 98 |
-
|
| 99 |
-
2. **Test the inference script:**
|
| 100 |
-
```bash
|
| 101 |
-
cd huggingface
|
| 102 |
-
python inference.py best_model_finetuned.pth ../path/to/test/audio.wav
|
| 103 |
-
```
|
| 104 |
-
|
| 105 |
-
3. **Verify all files are present:**
|
| 106 |
-
```bash
|
| 107 |
-
ls -lh huggingface/
|
| 108 |
-
```
|
| 109 |
-
|
| 110 |
-
## Post-Upload Checklist
|
| 111 |
-
|
| 112 |
-
After uploading, verify on Hugging Face:
|
| 113 |
-
|
| 114 |
-
- [ ] Model card displays correctly
|
| 115 |
-
- [ ] All three model files are uploaded
|
| 116 |
-
- [ ] Files are tracked with Git LFS (check file sizes)
|
| 117 |
-
- [ ] README renders properly with metadata
|
| 118 |
-
- [ ] Model appears in search results
|
| 119 |
-
- [ ] Tags are correct (audio-classification, underwater-acoustics, etc.)
|
| 120 |
-
|
| 121 |
-
## Model Repository Settings
|
| 122 |
-
|
| 123 |
-
On huggingface.co/shiv207/Marine1/settings:
|
| 124 |
-
|
| 125 |
-
1. **Visibility**: Public (recommended for first model)
|
| 126 |
-
2. **License**: MIT
|
| 127 |
-
3. **Tags**: Already set in README.md frontmatter
|
| 128 |
-
4. **Widget**: Disable (audio classification widget not fully supported yet)
|
| 129 |
-
|
| 130 |
-
## Updating the Model
|
| 131 |
-
|
| 132 |
-
To update files later:
|
| 133 |
-
|
| 134 |
-
```bash
|
| 135 |
-
# Using CLI
|
| 136 |
-
huggingface-cli upload shiv207/Marine1 ./updated_file.pth
|
| 137 |
-
|
| 138 |
-
# Or using Git
|
| 139 |
-
cd Marine1
|
| 140 |
-
git pull
|
| 141 |
-
# Make changes
|
| 142 |
-
git add .
|
| 143 |
-
git commit -m "Update: description of changes"
|
| 144 |
-
git push
|
| 145 |
-
```
|
| 146 |
-
|
| 147 |
-
## Troubleshooting
|
| 148 |
-
|
| 149 |
-
### Large File Issues
|
| 150 |
-
If you get errors about file size:
|
| 151 |
-
```bash
|
| 152 |
-
git lfs track "*.pth"
|
| 153 |
-
git add .gitattributes
|
| 154 |
-
git add *.pth
|
| 155 |
-
git commit -m "Track large files with LFS"
|
| 156 |
-
```
|
| 157 |
-
|
| 158 |
-
### Authentication Issues
|
| 159 |
-
```bash
|
| 160 |
-
# Re-login
|
| 161 |
-
huggingface-cli login --token YOUR_TOKEN
|
| 162 |
-
```
|
| 163 |
-
|
| 164 |
-
### Upload Timeout
|
| 165 |
-
For large files, increase timeout:
|
| 166 |
-
```bash
|
| 167 |
-
export HF_HUB_TIMEOUT=300
|
| 168 |
-
huggingface-cli upload shiv207/Marine1 . --repo-type model
|
| 169 |
-
```
|
| 170 |
-
|
| 171 |
-
## Example Usage After Upload
|
| 172 |
-
|
| 173 |
-
Users can then use your model like this:
|
| 174 |
-
|
| 175 |
-
```python
|
| 176 |
-
from huggingface_hub import hf_hub_download
|
| 177 |
-
|
| 178 |
-
# Download model
|
| 179 |
-
model_path = hf_hub_download(
|
| 180 |
-
repo_id="shiv207/Marine1",
|
| 181 |
-
filename="best_model_finetuned.pth"
|
| 182 |
-
)
|
| 183 |
-
|
| 184 |
-
# Use with your inference script
|
| 185 |
-
from inference import Marine1Classifier
|
| 186 |
-
classifier = Marine1Classifier(model_path)
|
| 187 |
-
result = classifier.predict("audio.wav")
|
| 188 |
-
```
|
| 189 |
-
|
| 190 |
-
## Promotion Tips
|
| 191 |
-
|
| 192 |
-
After uploading:
|
| 193 |
-
|
| 194 |
-
1. Share on Twitter/LinkedIn with #HuggingFace #MarineAI
|
| 195 |
-
2. Post in Hugging Face Discord community
|
| 196 |
-
3. Add to your GitHub README
|
| 197 |
-
4. Consider writing a blog post on Hugging Face blog
|
| 198 |
-
5. Add to Papers with Code if you have a paper
|
| 199 |
-
|
| 200 |
-
## Support
|
| 201 |
-
|
| 202 |
-
- Hugging Face Docs: https://huggingface.co/docs
|
| 203 |
-
- Community Forum: https://discuss.huggingface.co
|
| 204 |
-
- Discord: https://hf.co/join/discord
|
| 205 |
-
|
| 206 |
-
---
|
| 207 |
-
|
| 208 |
-
Good luck with your first Hugging Face model upload! ๐
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
model_card_metadata.yml
DELETED
|
@@ -1,52 +0,0 @@
|
|
| 1 |
-
# Model Card Metadata for Marine1
|
| 2 |
-
# This file contains structured metadata for better discoverability
|
| 3 |
-
|
| 4 |
-
language: en
|
| 5 |
-
license: mit
|
| 6 |
-
library_name: pytorch
|
| 7 |
-
tags:
|
| 8 |
-
- audio
|
| 9 |
-
- audio-classification
|
| 10 |
-
- underwater-acoustics
|
| 11 |
-
- marine-biology
|
| 12 |
-
- oceanography
|
| 13 |
-
- conservation
|
| 14 |
-
- pytorch
|
| 15 |
-
- resnet18
|
| 16 |
-
- transfer-learning
|
| 17 |
-
- mel-spectrogram
|
| 18 |
-
- marine-mammals
|
| 19 |
-
- vessel-detection
|
| 20 |
-
- environmental-monitoring
|
| 21 |
-
|
| 22 |
-
datasets:
|
| 23 |
-
- custom
|
| 24 |
-
|
| 25 |
-
metrics:
|
| 26 |
-
- accuracy
|
| 27 |
-
- balanced_accuracy
|
| 28 |
-
|
| 29 |
-
model-index:
|
| 30 |
-
- name: Marine1-Underwater-Acoustic-Classifier
|
| 31 |
-
results:
|
| 32 |
-
- task:
|
| 33 |
-
type: audio-classification
|
| 34 |
-
name: Underwater Sound Classification
|
| 35 |
-
dataset:
|
| 36 |
-
name: Custom Underwater Acoustics Dataset
|
| 37 |
-
type: custom
|
| 38 |
-
metrics:
|
| 39 |
-
- type: accuracy
|
| 40 |
-
value: 98.33
|
| 41 |
-
name: Test Accuracy
|
| 42 |
-
- type: balanced_accuracy
|
| 43 |
-
value: 91.67
|
| 44 |
-
name: Balanced Accuracy
|
| 45 |
-
|
| 46 |
-
pipeline_tag: audio-classification
|
| 47 |
-
|
| 48 |
-
widget:
|
| 49 |
-
- example_title: Marine Animal Sound
|
| 50 |
-
src: https://example.com/whale.wav
|
| 51 |
-
- example_title: Vessel Sound
|
| 52 |
-
src: https://example.com/ship.wav
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upload.sh
DELETED
|
@@ -1,73 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
|
| 3 |
-
# Marine1 Hugging Face Upload Script
|
| 4 |
-
# This script uploads your model to Hugging Face Hub
|
| 5 |
-
|
| 6 |
-
set -e # Exit on error
|
| 7 |
-
|
| 8 |
-
echo "๐ Marine1 Hugging Face Upload Script"
|
| 9 |
-
echo "======================================"
|
| 10 |
-
echo ""
|
| 11 |
-
|
| 12 |
-
# Check if huggingface-cli is installed
|
| 13 |
-
if ! command -v huggingface-cli &> /dev/null; then
|
| 14 |
-
echo "โ huggingface-cli not found!"
|
| 15 |
-
echo "Install it with: pip install huggingface_hub"
|
| 16 |
-
exit 1
|
| 17 |
-
fi
|
| 18 |
-
|
| 19 |
-
# Check if user is logged in
|
| 20 |
-
if ! huggingface-cli whoami &> /dev/null; then
|
| 21 |
-
echo "โ Not logged in to Hugging Face!"
|
| 22 |
-
echo "Login with: huggingface-cli login"
|
| 23 |
-
exit 1
|
| 24 |
-
fi
|
| 25 |
-
|
| 26 |
-
echo "โ
Hugging Face CLI found and authenticated"
|
| 27 |
-
echo ""
|
| 28 |
-
|
| 29 |
-
# Check if Git LFS is installed
|
| 30 |
-
if ! command -v git-lfs &> /dev/null; then
|
| 31 |
-
echo "โ ๏ธ Warning: Git LFS not found!"
|
| 32 |
-
echo "Large files may fail to upload."
|
| 33 |
-
echo "Install with: brew install git-lfs (macOS) or sudo apt-get install git-lfs (Linux)"
|
| 34 |
-
echo ""
|
| 35 |
-
read -p "Continue anyway? (y/n) " -n 1 -r
|
| 36 |
-
echo
|
| 37 |
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
| 38 |
-
exit 1
|
| 39 |
-
fi
|
| 40 |
-
else
|
| 41 |
-
echo "โ
Git LFS found"
|
| 42 |
-
fi
|
| 43 |
-
|
| 44 |
-
echo ""
|
| 45 |
-
echo "Files to upload:"
|
| 46 |
-
ls -lh *.pth *.mlmodel 2>/dev/null || echo " (model files)"
|
| 47 |
-
echo ""
|
| 48 |
-
|
| 49 |
-
# Confirm upload
|
| 50 |
-
read -p "Upload to shiv207/Marine1? (y/n) " -n 1 -r
|
| 51 |
-
echo
|
| 52 |
-
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
| 53 |
-
echo "Upload cancelled."
|
| 54 |
-
exit 0
|
| 55 |
-
fi
|
| 56 |
-
|
| 57 |
-
echo ""
|
| 58 |
-
echo "๐ Starting upload..."
|
| 59 |
-
echo ""
|
| 60 |
-
|
| 61 |
-
# Upload using huggingface-cli
|
| 62 |
-
huggingface-cli upload shiv207/Marine1 . --repo-type model
|
| 63 |
-
|
| 64 |
-
echo ""
|
| 65 |
-
echo "โ
Upload complete!"
|
| 66 |
-
echo ""
|
| 67 |
-
echo "View your model at: https://huggingface.co/shiv207/Marine1"
|
| 68 |
-
echo ""
|
| 69 |
-
echo "Next steps:"
|
| 70 |
-
echo " 1. Visit the model page and verify everything looks good"
|
| 71 |
-
echo " 2. Test downloading and using the model"
|
| 72 |
-
echo " 3. Share your model with the community!"
|
| 73 |
-
echo ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|