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.
- Host: GitHub
- URL: https://github.com/engichang1467/latex-ocr-api
- Owner: engichang1467
- Created: 2024-02-29T07:35:53.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-01T01:28:31.000Z (over 2 years ago)
- Last Synced: 2025-01-17T18:28:56.202Z (over 1 year ago)
- Topics: fastapi, latex, ocr
- Language: Python
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```