Skip to content

MaxWolf-01/sklearn-svm-classification-pipeline-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

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

About

A flask api for text-classification with sklearn pipelines.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published