How debasmitabose0/debai works
DebAI is a single-module Streamlit assistant for document extraction and contextual chat. Users upload images or PDFs, review extracted text, and ask questions; OCR text joins the chat session before model inference, and the conversation can be exported as a PDF. The README also describes image preprocessing, language-aware OCR, Ollama/Gemini inference, theme switching, and hotkeys. These capabilities share AI.py rather than separate modules; links for unsampled implementation details are based on README documentation.
Main entry points: AI.py Chat session
Components 15
App and chat
- Streamlit app
AI.py - Chat session
AI.py
Document processing
- Image upload
AI.py - PDF upload
AI.py - Image preprocessing
AI.py - PDF extraction
AI.py - OCR engine
AI.py - Language detection
AI.py
AI inference
- Model selection
AI.py - Ollama
- Google Gemini
- Assistant response
AI.py
Presentation and export
- Theme and hotkeys
AI.py - PDF report export
AI.py
Other components
- User
Connections 19
- User → Streamlit app: uses
README.md - Streamlit app → Image upload: accepts upload
README.md - Streamlit app → PDF upload: accepts upload
README.md - Image upload → Image preprocessing: preprocesses
README.md - Image preprocessing → OCR engine: provides image
README.md - PDF upload → PDF extraction: extracts text
README.md - PDF extraction → Chat session: adds context
README.md - OCR engine → Language detection: detects language
README.md - Language detection → OCR engine: selects OCR language
README.md - OCR engine → Chat session: adds context
README.md - User → Chat session: submits prompt
README.md - Chat session → Model selection: sends prompt
README.md - Model selection → Ollama: uses local model
README.md - Model selection → Google Gemini: falls back
README.md - Model selection → Assistant response: returns answer
AI.py - Assistant response → Streamlit app: renders response
README.md - User → Theme and hotkeys: switches theme
README.md - User → PDF report export: requests report
README.md - PDF report export → Chat session: exports history
README.md