/Latex-ocr-api

This is a simple API that uses the LatexOCR from the pix2tex package to extract latex code from an image.

Primary LanguagePython

Latex OCR API

This is a simple API that uses the LatexOCR from the pix2tex package to extract latex code from an image.

Create the Environment

pip install virtualenv

# Create the virtual environment
virtualenv venv

# Activate the virtual environment
source venv/bin/activate

Install the requirements

pip install -r requirements.txt

pip install -r requirements-dev.txt

Run the API

uvicorn app.main:app --reload

Test the API

pytest

Build the Docker Image

docker build -t latex-ocr-api .

Run the Docker Image

docker run -p 8000:8000 latex-ocr-api