This repository contains a Flask-based microservice that provides machine learning utilities for the ISACC service. The primary function of this service is to handle text classification tasks using a pre-trained BERT model. The service exposes an endpoint to predict scores for given input text messages.
git clone https://github.com/uwcirg/isacc-ml
cd isacc-ml
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
pip install -r requirements.txt
FLASK_APP=app.py
export FLASK_ENV=development
flask run
The service will be available at http://0.0.0.0:8000.
POST <ISACC_ML_HOST>/predict_score
Predicts the score for a given text message.
ISACC_ML_HOST=<ISACC ML address here>
curl -X POST $ISACC_ML_HOST/predict_score \
-H "Content-Type: application/json" \
-d '{
"message": "Your input message here"
}'
- Status: 200 OK
- Body:
{
"score": <predicted_score>
}
Modify isacc-ml/config.py for configuration settings.