๐ซ CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org
Python agentai-societiesartificial-intelligencecommunicative-aicooperative-aideep-learninglarge-language-modelsmulti-agent-systemsnatural-language-processing
CAMEL-AI OCR Demo (w/ Mistral)
A simple Streamlit app to extract and summarize text from PDFs and images using the Mistral OCR API, fully powered by the CAMEL-AI framework.
๐ Features
- Drag & drop PDF or image upload (up to 200MB)
- Live preview (PDF or image) in the sidebar
- One-click OCR extraction via Mistral OCR
- Nicely formatted OCR result in markdown
- Optional LLM-powered summary using CAMEL-AIโs agents
- Easy Mistral API key input (sidebar)
- Modern Streamlit UI, ready to customize
๐ ๏ธ Requirements
- Python 3.10 or 3.12 (recommended)
- CAMEL-AI (
camel-ai==0.2.61, installed viarequirements.txt) - mistralai (for API calls)
- Streamlit
- Pillow (image preview)
Install all dependencies in a clean virtualenv.
๐ฆ Quick Install
# 1. (Recommended) Create and activate virtualenv
python3.12 -m venv .venv
source .venv/bin/activate
# 2. Clone this demo repo or copy app.py and requirements.txt
# (Assume youโre in the right directory)
# 3. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
๐ Usage
- Get your Mistral API Key
- Run the Streamlit app:
streamlit run app.py - Open the app in your browser at http://localhost:8501
- Paste your API key in the sidebar, upload a PDF/image, and extract text!
๐ File Structure
app.py # Main Streamlit app
README.md # This file
requirements.txt # Python dependencies
๐ง Troubleshooting
- MistralReader import error?
Make sure you have
camel-ai==0.2.61installed (seerequirements.txt). - No module named mistralai?
Install with
pip install mistralai. - Python version errors? Use Python 3.10 or 3.12 only.
requirements.txt
streamlit
pillow
mistralai
camel-ai[all]==0.2.61