Skip to content

Flask API that uses a computer vision model to tell whether an image has something fluffy in it.

License

Notifications You must be signed in to change notification settings

mihailthebuilder/fluffnet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fluffnet

Intro

Flask API that uses a computer vision model to tell whether an image has something fluffy in it. Go to...

  • here for the live site
  • here to see how the model was built
  • here for info and source code on the frontend that uses this API

Table of contents

Architecture

The API is a simple Flask project with a single entry point. It takes an image as an input, and predicts to whether it has something fluffy with a confidence %. The prediction is based on a computer vision model that is stored in the fluffy-model.pkl file.

The app is only used by a single React frontend and hosted on a free Heroku service.

I've set up CORS such that it can only be accessed from 2 origins:

  • localhost if run locally
  • mihailthebuilder.github.io, which is the base URL for all the frontends I host with GitHub Pages

Running locally

Set up the frontend and run it locally.

Set up the Python environment.

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Run this command:

export FLASK_ENV=development

It enables debug mode with hot reload feature, and it enables CORS to localhost.

Start the app:

flask run

About

Flask API that uses a computer vision model to tell whether an image has something fluffy in it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages