Skip to content

pr1m8/notex-ai

Repository files navigation

📝 Notex

Notex is an AI-powered tool that converts handwritten notes, PDFs, and images into structured LaTeX documents. It leverages LLMs, computer vision (OCR), and LaTeX formatting corrections to provide a seamless workflow for generating high-quality, error-free LaTeX documents.

Notex Banner

Documentation License PyPI Build


📌 Features

Convert Handwritten Notes to LaTeX – Extracts mathematical expressions, text, and formatting.
Handles PDFs & Images – Converts PDF pages and scanned images into LaTeX code.
Error Handling & Auto-Fixing – Fixes LaTeX compilation issues automatically.
Document Structure Detection – Recognizes sections, theorems, proofs, equations, exercises and more.
OpenAI & Azure Integration – Uses LLMs for intelligent text extraction.
Fast LaTeX Compilation – Generates PDFs with error correction.


📖 Documentation

Full Documentation: 📚 ReadTheDocs

The docs include installation guides, API reference, and examples.


🚀 Installation

1️⃣ Install via Pip

pip install notex_ai

2️⃣ Install via Poetry

poetry add notex_ai

3️⃣ Install from Source

git clone https://github.com/pr1m8/notex.git
cd notex
poetry install

⚡ Usage

Convert a PDF or Image to LaTeX

from notex import Conversation

conv = Conversation(session_id="example", output_dir="output")

# Process a PDF
pdf_path = "input.pdf"
output_pdf = conv.process_pdf(pdf_path)

# Process an Image
image_path = "input.png"
latex_code = conv.process_images([image_path])

Compile LaTeX to PDF

final_pdf = conv.compile_latex_text(latex_code)

🛠 Configuration

Notex requires API keys for OpenAI/Azure integration.

Setup Environment Variables

Create a .env file:

AZURE_OPENAI_API_KEY="your-azure-key"
AZURE_URI="your-azure-endpoint"

Or use a config.ini file:

[AZURE_OPENAI]
API_KEY="your-key"
URI="your-endpoint"

🖥️ Running the Flask API

Notex includes an API server to handle uploads.

FLASK_APP=notex.app poetry run flask run --host=0.0.0.0 --port=5001

Use the API to upload files:

curl -X POST -F "file=@input.pdf" http://localhost:5001/upload

🏗️ Development & Contribution

Want to contribute? Follow these steps:

1️⃣ Fork & Clone

git clone https://github.com/pr1m8/notex.git
cd notex

2️⃣ Install Dependencies

poetry install

3️⃣ Run Tests

pytest

🔗 Related Projects


📜 License

This project is licensed under the MIT License. See LICENSE for details.


🔥 Stay Connected

Follow @pr1m8 on GitHub for updates and new features!

📢 Have ideas or feedback? Open an issue or start a discussion.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages