How quubble/galaxytranslator works
Galaxy Translator is a Streamlit web app for translating text with Meta’s pretrained NLLB-200 model. A user enters text and selects source and target languages; the app maps those selections to NLLB codes, tokenizes the input, generates a translation, and displays the decoded result. Model and tokenizer loading, language selection, inference, and presentation are all implemented in app.py. The README documents searchable language selection and CPU support; no separate speech workflow is implemented. Components share one source file, so the graph separates responsibilities rather than implying separate modules.
Main entry points: app.py Translation generation
Components 8
Streamlit interface
- Text and language UI
app.py - Language code map
app.py - Translation display
app.py
Model setup
- Cached model loader
app.py - Pretrained NLLB model
Translation runtime
- NLLB tokenizer
app.py - Translation generation
app.py
Other components
- User
Connections 9
- User → Text and language UI: enters and selects
app.py - Text and language UI → Language code map: maps selections
app.py - Text and language UI → Translation generation: submits text
app.py - Cached model loader → Pretrained NLLB model: loads pretrained weights
app.py - Cached model loader → NLLB tokenizer: loads tokenizer
app.py - Translation generation → NLLB tokenizer: tokenizes and decodes
app.py - Translation generation → Pretrained NLLB model: generates translation
app.py - Translation generation → Translation display: displays translation
app.py - Translation display → User: shows result
app.py