testing_spaces / README.md
Klasta's picture
First commit
5c6e546
---
title: Cat vs Dog Classifier ๐Ÿถ๐Ÿฑ
emoji: ๐Ÿพ
colorFrom: gray
colorTo: red
sdk: docker
pinned: false
---
# ๐Ÿพ Cat vs Dog Classifier - FastAPI + PyTorch
This Space hosts a FastAPI-based image classification API that distinguishes between **cats** and **dogs** using a fine-tuned **ResNet50** model.
## ๐Ÿš€ How It Works
- Accepts an uploaded image via a POST request.
- Processes the image using `albumentations` and a pre-trained PyTorch model.
- Returns `"cat"` or `"dog"` based on prediction confidence.
## ๐Ÿงช Try It Out
You can interact with the `/predict-image` endpoint using tools like:
- `curl`
- Postman
- Any frontend that supports `multipart/form-data` file uploads.
### Example:
```bash
curl -X POST \
-F "file=@your_image.jpg" \
https://Klasta-testing_spaces.hf.space/predict-image