Skip to content

StevenJL/bart_large_mnli_json_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

BART Large MNLI as a JSON web API

Dev Set Up

  1. Ensure Python3 is installed
which python3
  1. Pip Install Pytorch
pip3 install torch
  1. Install transformers
pip3 install transformers
  1. Install flask
pip3 install flask
  1. Run flask
cd app
export FLASK_APP=main
export FLASK_ENV=development
flask run
  1. Test it out
curl -X POST http://localhost:5000/transform -d '{"sequence_to_classify": "one day I will see the world", "candidate_labels":["travel","cooking","dancing"]}' -H 'Content-Type: application/json'

Heroku support

  • Note the presence of requirements.txt, Procfile, and wsgi.py. This app can be pushed to Heroku and it would just work.

About

Bart Large MNLI As a JSON API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published