Skip to content

Kiri23/fast-api-nlp

Repository files navigation

example-nlp-project

This is an example NER service using Spacy and was built to show Data Scientists & Analysts a quick way to turn their models into deployable services.

Requirements

  • download poetry brew install poetry

  • download poppler for mac to process PDF brew install poppler. Other Os install ref

    • Test if the install run sucessfully by running pdftoppm -h
    • pdftoppm -png fargo.pdf fargo - This will convert pdf pages to images
    • Available tools from poppler:
      • some examples are pdfimages, pdftotext, pdftohtml, pdfinfo, pdftopng, pdffonts.

    Opencv

    • Read the docker file to know what libraries were installed to make opencv work

How to run

  • poetry init to initialize a project
  • poetry shell - This will initiate a venv enviroment
  • uvicorn src.main:app --reload or
  • bash runDocker.sh to run the docker command

with docker

docker build -t kiri23/fast-api-nlp:latest .

docker run -p 80:80 kiri23/fast-api-nlp:latest

FAQ

The YouTube video for the run through can be found here.

Swagger doc for the project can be seen & tested here.