How engabdullah3334-bot/omnitranslate_agent works
OmniTranslate is a document translation application whose principal workflow accepts a PDF, text file, or inline text, extracts page-sized text, analyzes language and context with LLaMA through Ollama, hands extracted pages across a memory boundary, translates them page by page with NLLB, then saves and logs results. The orchestrator owns extraction, model coordination, handover, translation, and logging; the CLI owns interaction and final exports. README capabilities include byte-based extraction for uploads. Source excerpts establish the main CLI and model calls; some documented extraction and logging details were not fully sampled.
Main entry points: orchestrator.py Model orchestrator · main.py CLI workflow · translator_engine.py NLLB engine
Components 11
Input and extraction
- CLI workflow
main.py - Text extraction
orchestrator.py
Pipeline coordination
- Page handover
orchestrator.py - Model orchestrator
orchestrator.py
Translation models
- Ollama LLaMA
- NLLB engine
translator_engine.py - Hugging Face models
Results and records
- Translated text
- Translated PDF
- Translation log
Other components
- Document user
Connections 15
- Document user → CLI workflow: provides input
main.py - CLI workflow → Text extraction: extracts pages
main.py - Text extraction → Model orchestrator: provides pages
README.md - CLI workflow → Model orchestrator: requests analysis
main.py - Model orchestrator → Ollama LLaMA: analyzes request
README.md - Model orchestrator → Ollama LLaMA: evicts model
orchestrator.py - CLI workflow → Page handover: saves and reloads
main.py - Model orchestrator → Page handover: reads and writes
README.md - CLI workflow → Model orchestrator: requests translation
main.py - Model orchestrator → NLLB engine: loads and translates
orchestrator.py - NLLB engine → Hugging Face models: loads weights
translator_engine.py - CLI workflow → Translated text: writes translation
main.py - CLI workflow → Translated PDF: exports PDF
main.py - CLI workflow → Model orchestrator: records session
main.py - Model orchestrator → Translation log: appends session
README.md