Skip to content

A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.

audit: fix latex_formula_ocr - rewrite em dashes, add demo screenshot, add back-to-top link

Tiioluwani9037c00f8e49
diff --git a/OCR/latex_formula_ocr/README.md b/OCR/latex_formula_ocr/README.md
index eb198bf..43a3da1 100644
--- a/OCR/latex_formula_ocr/README.md
+++ b/OCR/latex_formula_ocr/README.md
@@ -1,23 +1,29 @@
-# LaTeX Formula OCR — Extract and render math formulas from images using local AI
+# LaTeX Formula OCR
+
+> Extract and render math formulas from images using local AI, powered by GLM-OCR and KaTeX.
+
+## Demo
+
+![Demo](assets/demo.gif)
## Overview
-Reading mathematical formulas from images or scanned documents is tedious and error-prone when done by hand. This tool solves that by running a vision-language model entirely on your machine — no cloud services, no API keys — to detect every equation in an uploaded image or PDF and instantly render it in a polished, browser-native display.
+Reading mathematical formulas from images or scanned documents is tedious and error-prone when done by hand. This tool solves that by running a vision-language model entirely on your machine, requiring no cloud services or API keys, to detect every equation in an uploaded image or PDF and instantly render it in a polished, browser-native display.
It works by sending the image to **GLM-OCR** (served locally via Ollama), which returns raw LaTeX source for each detected formula. The app then parses those results and renders them visually using **KaTeX**, all within a Streamlit web interface.
-Students, researchers, engineers, and anyone who regularly works with mathematical documents will benefit from this tool — particularly when digitising textbooks, lecture slides, or handwritten notes.
+Students, researchers, engineers, and anyone who regularly works with mathematical documents will benefit from this tool, particularly when digitising textbooks, lecture slides, or handwritten notes.
## Features
-- **Fully local inference** — GLM-OCR runs via Ollama; no API keys or internet access required for OCR
-- **Image and PDF support** — upload PNG, JPG/JPEG, or single-page PDFs (first page rendered automatically)
-- **Multi-formula extraction** — detects and extracts every equation in the image in one pass
-- **In-browser KaTeX rendering** — formulas are rendered in display mode with proper mathematical typesetting
-- **LaTeX source viewer** — each formula card shows the raw LaTeX alongside the rendered output
-- **One-click copy** — copy any formula's LaTeX source to the clipboard instantly
-- **Live Ollama status** — sidebar shows whether Ollama is running and whether glm-ocr is installed
-- **Auto image resizing** — large images are downscaled before inference to keep requests fast
+- **Fully local inference**: GLM-OCR runs via Ollama; no API keys or internet access required for OCR
+- **Image and PDF support**: upload PNG, JPG/JPEG, or single-page PDFs (first page rendered automatically)
+- **Multi-formula extraction**: detects and extracts every equation in the image in one pass
+- **In-browser KaTeX rendering**: formulas are rendered in display mode with proper mathematical typesetting
+- **LaTeX source viewer**: each formula card shows the raw LaTeX alongside the rendered output
+- **One-click copy**: copy any formula's LaTeX source to the clipboard instantly
+- **Live Ollama status**: sidebar shows whether Ollama is running and whether glm-ocr is installed
+- **Auto image resizing**: large images are downscaled before inference to keep requests fast
## Tech Stack
@@ -104,3 +110,7 @@ latex-formula-ocr/
├── requirements.txt # Python dependencies
└── README.md # Project documentation
```
+
+---
+
+[Back to top](#latex-formula-ocr)
diff --git a/OCR/latex_formula_ocr/assets/demo.gif b/OCR/latex_formula_ocr/assets/demo.gif
new file mode 100644
index 0000000..28ed1e3
Binary files /dev/null and b/OCR/latex_formula_ocr/assets/demo.gif differ