Update README.md
Browse files
README.md
CHANGED
|
@@ -1,97 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
-
|
| 3 |
-
Satellite Classification Dashboard
|
| 4 |
-
A Gradio-based application for classifying satellite images using pre-trained deep learning models. Upload a PNG, JPG, or JPEG image, select one or more models (Custom CNN, MobileNetV2, EfficientNetB0, DenseNet121), and view predictions with confidence scores and visualizations.
|
| 5 |
-
Quick Start
|
| 6 |
-
|
| 7 |
-
Live Demo: Visit https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio.
|
| 8 |
-
Local Setup:git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 9 |
-
cd Satellite-Classification-Gradio
|
| 10 |
-
python -m venv venv
|
| 11 |
-
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 12 |
-
pip install -r requirements.txt
|
| 13 |
-
python app.py
|
| 14 |
-
|
| 15 |
-
Open http://localhost:7860.
|
| 16 |
-
|
| 17 |
-
Dependencies
|
| 18 |
-
Listed in requirements.txt:
|
| 19 |
-
|
| 20 |
-
gradio==5.0.2
|
| 21 |
-
tensorflow-cpu==2.15.0
|
| 22 |
-
h5py==3.10.0
|
| 23 |
-
numpy==1.26.4
|
| 24 |
-
pandas==2.2.2
|
| 25 |
-
plotly==5.22.0
|
| 26 |
-
Pillow==10.4.0
|
| 27 |
-
requests==2.32.3
|
| 28 |
-
protobuf==3.20.3
|
| 29 |
-
|
| 30 |
-
Troubleshooting
|
| 31 |
-
Missing configuration in README
|
| 32 |
-
|
| 33 |
-
Cause: The README.md lacks proper YAML front matter or is not detected.
|
| 34 |
-
Fix:
|
| 35 |
-
Save this README.md as README.md (case-sensitive) in the repository root.
|
| 36 |
-
Ensure YAML syntax is correct (2-space indentation, quoted sdk_version).
|
| 37 |
-
Push to repository:git add README.md
|
| 38 |
-
git commit -m "Fix YAML front matter in README.md"
|
| 39 |
-
git push
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
Restart the Space in the Settings tab.
|
| 43 |
-
If the error persists, create a new Space to avoid caching issues.
|
| 44 |
-
|
| 45 |
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
|
| 49 |
-
|
| 50 |
-
Fix:
|
| 51 |
-
Ensure requirements.txt includes h5py==3.10.0.
|
| 52 |
-
Verify the model URL (e.g., https://huggingface.co/Bhavi23/Custom_CNN/resolve/main/best_multimodal_model.keras):curl -I https://huggingface.co/Bhavi23/Custom_CNN/resolve/main/best_multimodal_model.keras
|
| 53 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
| 56 |
-
python -c "import tensorflow as tf; model = tf.keras.models.load_model('best_multimodal_model.keras')"
|
| 57 |
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
-
Alternatively, include model files in the repository:mkdir models
|
| 61 |
-
mv best_multimodal_model.keras models/
|
| 62 |
-
git add models/best_multimodal_model.keras
|
| 63 |
-
git commit -m "Add Custom CNN model file"
|
| 64 |
-
git push
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
Use a Dockerfile for consistency:FROM python:3.9-slim
|
| 68 |
-
WORKDIR /app
|
| 69 |
-
COPY requirements.txt .
|
| 70 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 71 |
-
COPY . .
|
| 72 |
-
EXPOSE 7860
|
| 73 |
-
CMD ["python", "app.py"]
|
| 74 |
-
|
| 75 |
|
|
|
|
| 76 |
|
|
|
|
| 77 |
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
-
|
|
|
|
|
|
|
| 80 |
|
| 81 |
-
|
| 82 |
-
Fix:
|
| 83 |
-
Verify requirements.txt includes tensorflow-cpu==2.15.0.
|
| 84 |
-
Check build logs in the Space’s Settings tab.
|
| 85 |
-
Test locally:python -m venv venv
|
| 86 |
-
source venv/bin/activate
|
| 87 |
pip install -r requirements.txt
|
| 88 |
-
python app.py
|
| 89 |
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
Support
|
| 95 |
-
|
| 96 |
-
Issues: Hugging Face Discussions
|
| 97 |
-
Email: bhavithrass@gmail.com
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Satellite Classification Dashboard
|
| 3 |
+
emoji: "🛰️"
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: "5.0.2"
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
---
|
| 11 |
|
| 12 |
+
# 🛰️ Satellite Classification Dashboard
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
+
A Gradio-based application for classifying satellite images using pre-trained deep learning models.
|
| 15 |
|
| 16 |
+
---
|
| 17 |
|
| 18 |
+
## 🔍 Features
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
+
- Upload a PNG, JPG, or JPEG satellite image.
|
| 21 |
+
- Choose from 4 pretrained models:
|
| 22 |
+
- ✅ Custom CNN
|
| 23 |
+
- ✅ MobileNetV2
|
| 24 |
+
- ✅ EfficientNetB0
|
| 25 |
+
- ✅ DenseNet121
|
| 26 |
+
- Get predictions with confidence scores.
|
| 27 |
+
- View visualizations of model outputs.
|
| 28 |
|
| 29 |
+
---
|
|
|
|
| 30 |
|
| 31 |
+
## 🚀 Live Demo
|
| 32 |
|
| 33 |
+
👉 [Launch the App](https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
+
---
|
| 36 |
|
| 37 |
+
## 🛠️ Local Setup
|
| 38 |
|
| 39 |
+
```bash
|
| 40 |
+
git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 41 |
+
cd Satellite-Classification-Gradio
|
| 42 |
|
| 43 |
+
# Set up a virtual environment
|
| 44 |
+
python -m venv venv
|
| 45 |
+
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 46 |
|
| 47 |
+
# Install dependencies
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
pip install -r requirements.txt
|
|
|
|
| 49 |
|
| 50 |
+
# Run the app
|
| 51 |
+
python app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|