This project is a local OCR (Optical Character Recognition) app built with Streamlit, enabling users to extract text from images using LLMs.
- 📁 Upload images or PDFs for OCR processing
- 🤖 Use Ollama for local LLM-based OCR
- ☁️ Use Sambanova cloud API for OCR
- 🧠 Supports multiple models from Ollama
- 🧹 Clear chat history and temp files easily
- 💬 Chat-like interface to view OCR results
- Clone the repository:
git clone https://github.com/drisskhattabi6/Images_OCR_Locally.git
cd Images_OCR_Locally- Install dependencies:
pip install -r requirements.txt- Install Ollama & Pull a Vision Model:
Make sure Ollama is installed and running.
ollama pull llama3.2-vision
⚠️ Note: Ollama only supports images, not PDFs.
- Set up your
.envfile:
Create a .env file and add your Sambanova API key:
API_KEY=your_sambanova_api_key
🔐 Required: You must have an API key from Sambanova to use their cloud models.
streamlit run app.pyAPP Screenshot:
local-ocr-app/
├── app.py # Main Streamlit app
├── ocr.py # OCR logic (local and remote)
├── .env # Contains API key (create the File)
├── requirements.txt # Python dependencies
└── tmp/ # Temporary folder for uploaded files (auto-created)
-
❌ No models found in Ollama? Run:
ollama pull llama3.2-vision -
❌ Missing API Key for Sambanova? Make sure
.envfile contains:API_KEY=your_key_here


