Trained model. Where should I deploy it?


I have trained a Spacy NER model to identify recipe ingredients. Prodigy made this easy!

So if I have something like 3 large yellow onions then yellow onions is identified.

What should I now do with this model?

Here's my use case.

I have an AWS lambda function that will extract a full recipe from the JSON schema on a website. Part of that is an array of ingredients (i.e., 3 large yellow onions) that I want to pass into another function to get back "yellow onion."

I suspect I need an API endpoint /classify/ingredients that sits in front of a python function that passes the information into my Spacy model.

Where do people deploy these things? I love using AWS Lambdas because of the low cost. I'd love to know what others are doing though to move spacy models into a production environment in a cost effective way.


Hi! That's great to hear :blush: There are various different options but if you like AWS Lambdas, you might want to check out this project and example:

The spacy package command lets you package your trained pipeline as a Python package, which you can install and deploy like any other Python package.

FastAPI is a popular choice for setting up a REST API And you can find a simple example using a spaCy model to extract and return named entities here:

1 Like