Skip to content

radandreicristian/headline-classifier-rs

Repository files navigation

Headline Classifier

A simple and powerful end-to-end short text classification project in Rust, using Polars, Candle and Warp.

Features

  • 🧘 Simple NLP neural network training using 🤗 Candle
  • 🚀 CSV I/O and processing with Polars
  • ⚡️ Inference via HTTP with Warp

Usage

Training

To train a model, run the training binary:

RUST_LOG=info cargo run --bin training

Inference

To start the prediction service over HTTP, run the inference binary:

RUST_LOG=warn cargo run --bin inference

Then, to get the predictions, send a request via CURL/Postman:

curl -X POST -H "Content-Type: application/json" -d '{"text": "blizzard hits southwest"}' http://localhost:3030/predict

Docker

To build and run a Docker container:

docker build -t "headline-classifier" .; docker run -p 3030:3030 headline-classifier:latest

About

End-to-end text classification in Rust w/ Polars, Candle and Warp

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published