Update README.md
Browse files
README.md
CHANGED
|
@@ -1,28 +1,88 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Satellite Classification Dashboard
|
| 3 |
-
emoji: 🛰️
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: purple
|
| 6 |
-
sdk: gradio
|
| 7 |
-
sdk_version: 5.38.0
|
| 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. 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.
|
| 15 |
-
|
| 16 |
-
## Quick Start
|
| 17 |
|
| 18 |
Try the Live Demo: Visit https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio.
|
| 19 |
-
|
| 20 |
-
### Local Setup
|
| 21 |
-
|
| 22 |
-
```bash
|
| 23 |
-
git clone https://huggingface.co/spaces/your-username/Satellite-Classification-Gradio
|
| 24 |
cd Satellite-Classification-Gradio
|
| 25 |
python -m venv venv
|
| 26 |
source venv/bin/activate # On Windows: venv\Scripts\activate
|
| 27 |
pip install -r requirements.txt
|
| 28 |
-
python app.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
title: Satellite Classification Dashboardemoji: 🛰️colorFrom: bluecolorTo: purplesdk: gradiosdk_version: 5.0.2app_file: app.pypinned: false
|
| 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 |
Try the 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 in your browser.
|
| 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 |
+
Error loading <model>: Unable to load model. Filepath is not an hdf5 file (or h5py is not available) or SavedModel
|
| 32 |
+
|
| 33 |
+
Cause: The model file is not a valid HDF5 or SavedModel, or h5py is missing.
|
| 34 |
+
Fix:
|
| 35 |
+
Ensure requirements.txt includes h5py==3.10.0.
|
| 36 |
+
Verify the model URL (e.g., https://huggingface.co/Bhavi23/Custom_CNN/resolve/main/best_multimodal_model.keras) is correct and accessible.
|
| 37 |
+
Download the model file locally and test:wget https://huggingface.co/Bhavi23/Custom_CNN/resolve/main/best_multimodal_model.keras
|
| 38 |
+
python -c "import tensorflow as tf; model = tf.keras.models.load_model('best_multimodal_model.keras')"
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
If the file is invalid, check the Hugging Face repository for the correct file or contact the model owner.
|
| 42 |
+
Alternatively, include model files in the repository:git add models/best_multimodal_model.keras
|
| 43 |
+
git commit -m "Add Custom CNN model file"
|
| 44 |
+
git push
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Use a Dockerfile for a consistent environment:FROM python:3.9-slim
|
| 48 |
+
WORKDIR /app
|
| 49 |
+
COPY requirements.txt .
|
| 50 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 51 |
+
COPY . .
|
| 52 |
+
EXPOSE 7860
|
| 53 |
+
CMD ["python", "app.py"]
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
Restart the Space after changes.
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
ModuleNotFoundError: No module named 'tensorflow'
|
| 61 |
+
|
| 62 |
+
Cause: TensorFlow failed to install.
|
| 63 |
+
Fix:
|
| 64 |
+
Verify requirements.txt includes tensorflow-cpu==2.15.0 and protobuf==3.20.3.
|
| 65 |
+
Check build logs in the Space’s Settings tab.
|
| 66 |
+
Test locally:python -m venv venv
|
| 67 |
+
source venv/bin/activate
|
| 68 |
+
pip install -r requirements.txt
|
| 69 |
+
python app.py
|
| 70 |
+
|
| 71 |
+
|
| 72 |
+
Use the above Dockerfile if needed.
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
Missing configuration in README
|
| 77 |
+
|
| 78 |
+
Cause: The README.md lacked the YAML front matter.
|
| 79 |
+
Fix: This file includes the correct YAML header. Ensure it is saved as README.md:git add README.md
|
| 80 |
+
git commit -m "Update README.md"
|
| 81 |
+
git push
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
Support
|
| 86 |
+
|
| 87 |
+
Issues: Hugging Face Discussions
|
| 88 |
+
Email: bhavithrass@gmail.com
|