An open API service indexing awesome lists of open source software.

https://github.com/engichang1467/latex-ocr-api

This is a simple API that uses the LatexOCR from the pix2tex package to extract latex code from an image.
https://github.com/engichang1467/latex-ocr-api

fastapi latex ocr

Last synced: about 2 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# Latex OCR API

This is a simple API that uses the LatexOCR from the [`pix2tex`](https://github.com/lukas-blecher/LaTeX-OCR) package to extract latex code from an image.

## Create the Environment

```bash
pip install virtualenv

# Create the virtual environment
virtualenv venv

# Activate the virtual environment
source venv/bin/activate
```

## Install the requirements

```bash
pip install -r requirements.txt

pip install -r requirements-dev.txt
```

## Run the API

```bash
uvicorn app.main:app --reload
```

## Test the API

```bash
pytest
```

## Build the Docker Image

```bash
docker build -t latex-ocr-api .
```

## Run the Docker Image

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