Skip to content

mook003/thinker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐾 Fox Classifier

A simple ML project for classifying fox (and cat just) using PyTorch, FastAPI, and Streamlit.
The application runs via Docker Compose and consists of two services:

  • API (FastAPI + Uvicorn) — performs predictions using the trained model.
  • UI (Streamlit) — provides a user-friendly web interface to upload images and get results.

📂 Project Structure


project-root/
│── foxes_for_TA             # A folder with Fox images for network testing, try them all, I searched very diligently for them  :)
│── code/
│   ├── models/              # model training
│   ├── deployment/
│   │   ├── api/             # FastAPI service and best model storage
│   │   └── app/             # Streamlit service
│── docker-compose.yml       # runs both services
│── README.md


🚀 Getting Started

1. Build and run containers

docker compose up --build

After that the following services will be available:


📖 Usage

Via UI

  1. Open http://localhost:8501.
  2. Upload an image (cat / fox).
  3. Get a prediction from the model.

Via API

You can send a request directly:

curl -X POST "http://localhost:8000/predict/" \
  -F "file=@fox.jpg"

Response:

{
  "class": "fox
}

⚙️ Tech Stack

  • Python 3.10
  • PyTorch + Torchvision
  • FastAPI
  • Streamlit
  • Docker & Docker Compose

Update NN

In root of repo run following command

python code/models/thinker_main.py 

🛠️ TODO

  • Add model training inside a container
  • Store prediction history
  • Extend dataset and classes

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors