File size: 818 Bytes
431eba4
5c6e546
 
431eba4
 
 
 
 
 
5c6e546
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
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