GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - octohedron/sclapi: Simple deep neural network text classifier API

BranchesTags
Open more actions menu

Latest commit

 

History

11 Commits
11 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
DNNClassifier.py
DNNClassifier.py
 
 
README.md
README.md
 
 
api.py
api.py
 
 
custom_log.py
custom_log.py
 
 
dnn_loader.py
dnn_loader.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

sclapi

Simple text classifier API.

Classifies English text into Positive or Negative.

Examples

  • History tells us of glorious friendships in the ancient world. is Positive
  • There was a man with tongue of wood Who essayed to sing, And in truth it was lamentable is Negative.
  • Here one of the most atrocious massacres of the West took place. is Negative
  • What should it be but the most magnificent palace that had ever been seen in the world. is Positive

See it in action

Make a POST request to http://datahangar.net/api with form-data field text -> string i.e. Today was a wonderful day. should return Positive

Description

  • Trains a Deep Neural Network classifier with 50K IMDB reviews
  • Saves the trained model in a /data folder in the parent directory
  • Uses flask for serving an API accepting POST requests with a text field
  • Responds with 'Positive' or 'Negative'

Usage

  1. Install requirements with pip3 install -r requeriments.txt, etc.
  2. Train the model, might require some time depending on computing power, simple as running the script python3 DNNClassifier.py, you can train it locally and then upload the data folder to your server.
  3. Export flask app, export FLASK_APP=$(pwd)/api.py
  4. Run it with flask run
  5. Make a POST request to http://127.0.0.1:5000/api with form-data field text and some text, i.e. Today was a wonderful day, should return Positive.

About

Simple deep neural network text classifier API

Topics

apiclassifierdeep-neural-networksflasknlp-machine-learningtensorflow

Resources

Readme
Activity

Stars

4 stars

Watchers

1 watching

Forks

1 fork
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.