Deploy a Local Ollama-Powered Scikit-LLM Zero-Shot Text Classification Pipeline as a REST API with FastAPI

Written by

in

This tutorial shows how to connect a Scikit-LLM zero-shot text classification pipeline to the local Ollama llama3 model and serve it as a REST API through FastAPI async endpoints. The pipeline uses scikit-learn’s fit/predict syntax to perform classification and serialization, producing scikit_llm_model.joblib. The model is loaded when the service starts, and it accepts multiple texts in a single request and returns the corresponding predictions.

Source:machinelearningmastery.com · Read original

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *