Skip to content
Django / Flask based API to classify websites and detect toxic comments. https://ask.shawnshan.com
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
back_end
front_end
README.md
requirement.txt

README.md

Ask-API

This repository is intended to be a sample of setting up production APIs to host machine learning models. Hosting ML models are extremely easy with Django, Flask, and Nginx.

Check out at https://ask.shawnshan.com, Django / Flask based API to classify websites and detect toxic comments.

Set Up

  1. First Git clone current repository

git clone https://github.com/Shawn-Shan/Ask-API.git

  1. Install dependancy, eg. Django and Flask (strongly recommended to use python3)

pip3 install -r requirement.txt

  1. Set up backend server

cd back_end

python3 app.py

This will start Flask server at port 4563 (change app.py if want different config)

  1. Start front end server

cd front_end

python3 manage.py migrate

python3 manage.py runserver 0.0.0.0:8000

This will start front end server at port 8000. Access it at http://localhost:8000/

  1. Look and WOW

alt text

Host Your Own Model

If you would like to host your own model, you need to modify the backend code, and add an end point at app.py. Change @app.route('/ghate', methods=['GET']) to the url you want to host, and write your backend code to handle get requests.

You can’t perform that action at this time.