And change the directory:
git clone https://github.com/Extremesarova/sentiment_classification_deployment.git
cd sentiment_classification_deployment
Using this link (two files: vectorizer and classifier) and place it inside /app/model
directory.
docker build -t sentiment_classification-app:0.4.0 .
docker run -p 80:80 sentiment_classification-app:0.4.0
Using this link to check that everything is okay:
{
"health_check":"OK",
"model_version":"0.4.0"
}
To get the prediction:
-
Open webpage using this link.
-
Press "Try it out".
-
Replace
string
inside the form with your text containing sentiment in Russian:{ "text": "string" }
-
Press execute.
-
Look at the result below:
{ "sentiment": { "negative": 0.6240637133186361, "positive": 0.3759362866813639 } }
Or just send a POST request using CURL like the one below in your terminal, replacing string
with your text containing sentiment in Russian:
curl -X 'POST' \
'http://0.0.0.0/predict' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"text": "string"
}'