NLP model & API
Tweet sentiment
A small model, trained and served as an API.
ML and backend developer
Small demo · deployed on CPU
Python / MiniLM / FastAPI / ONNX / Docker
This small demonstration project covers training a text classifier and making it available through a working API. It labels English text as positive, neutral or negative.
Training and evaluation
I started with a TF-IDF baseline, then fine-tuned MiniLM on TweetEval. Macro-F1 reached 0.693, compared with 0.564 for the baseline on the same published test split.
These are results on that benchmark. They do not establish accuracy on every kind of English text. The project includes an analysis of common prediction errors.
Serving the model
I prepared the data, trained and evaluated the model, exported it to quantized ONNX and built the FastAPI service. The model runs on CPU without PyTorch in the serving container.
The live app has a text input and example sentences. API documentation, validation and readiness checks are included, along with training instructions and Docker setup in the repository.