An interactive deep learning + Streamlit web app that classifies cats and dogs from uploaded images with confidence scores.
Built to practice real-world deep learning workflows using TensorFlow, Streamlit, and your custom dataset.
- Upload an image of a cat or dog
- See the predicted label with emoji (🐱 or 🐶)
- Displays confidence (accuracy) %
- Clean, centered, user-friendly interface
- Runs locally or can be deployed online (Streamlit Cloud)
Above: Example usage of the app with a sample image. Upload your own cat or dog photo to see predictions!
- Python 3.10+
- TensorFlow (for the trained CNN model)
- Streamlit (for the web app)
- Pillow & NumPy (for image processing)
cat-dog-classifier/
│
├── app.py # Streamlit app
├── cat_dog_classifier.h5 # Trained model
├── requirements.txt # Dependencies for deployment
└── README.md # Project documentation
1️⃣ Clone this repository
git clone https://github.com/SultanAhmmed/cat-dog-classifier.git
cd cat-dog-classifier2️⃣ Create and activate a virtual environment (recommended)
Windows:
python -m venv dl_env
.\dl_env\Scripts\activateLinux / Mac:
python3 -m venv dl_env
source dl_env/bin/activate3️⃣ Install dependencies
pip install -r requirements.txt4️⃣ Run the app
streamlit run app.pyYour browser will open automatically. Upload a cat or dog image and get your prediction!
-
Upload image:
dog.jpg
Output: "✅ It's a Dog 🐶", Confidence: 98.3% -
Upload image:
cat.jpg
Output: "✅ It's a Cat 🐱", Confidence: 97.1%
- Practice image-based deep learning projects
- Learn TensorFlow workflow (training, saving, loading models)
- Learn building and deploying ML apps with Streamlit
- Build a portfolio project for your CV
- Allow live webcam capture
- Display model architecture and training accuracy
- Add batch image classification
- Support mobile responsiveness
PRs and suggestions are welcome to improve this project and help learners build stronger deep learning + deployment workflows.
This project is under the MIT License.
👤 Sultan Ahmmed
🌱 Learning and building practical AI projects to improve real-world skills.
