Coder Social home page Coder Social logo

maxwolf-01 / sklearn-svm-classification-pipeline-api Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 9 KB

A flask api for text-classification with sklearn pipelines.

License: MIT License

Dockerfile 4.30% Python 95.70%
docker flask-api ml-pipeline sklearn svm-classifier

sklearn-svm-classification-pipeline-api's Introduction

sklearn-svm-classification-pipeline-api

A flask api for text-classification with sklearn pipelines.


To try it out just clone the repository and run the following command: (assuming you have docker installed)

docker compose up --build

OR

Run app.py directly as a script.


You will find the classification service at http://127.0.0.1:5000/

  • To initialize and train the model:
    • Send a post request to /train in the form of:
      [
          {
              "id": 69,
              "text": "example text",
              "label": 1
          }, 
          ...
      ]
      
  • To predict:
    • Send a post request to /predict:
      {
          "id": 69,
          "text": "example text",
      }
      
    • It will return a prediction:
      {    
          "id": 69,
          "label": 1,
          "confidence": 99
      }
      
  • For info about the model parameters and accuracy:
    • Send a get request to /info

sklearn-svm-classification-pipeline-api's People

Contributors

maxwolf-01 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.