- This Model is based on Facebook's bart-large-mnli pretrained model provided by HuggingFace https://huggingface.co/facebook/bart-large-mnli
- It is a simple zero-shot-classification for sentiment analysis of a given text
- Providing custom labels is also supported
docker build . -t zeroshot
docker run -p 5050:5050 zeroshot
curl -X POST -H "Content-Type: application/json" -d '{"text": "I love Hugging Face Transformers!", "labels": ["positive", "negative", "neutral"]}' http://localhost:5050/classify
app/
: Contains the application code- app.py: Flask App that serves the model at port 5050
- model.py: Prepares the model and creates a zero-shot-classification pipeline
model/
: Contains the model files cloned from https://huggingface.co/facebook/bart-large-mnli- model.safetensors: This is the model weights file that is downloaded by the Docker image and stored inside this directory. This is done so that the weights don't have to be downloaded everytime the docker image is run