Fully offline Sinhala chatbot Local inference with OLLAMA Streamlit-based interactive UI Prompt engineering + rewrite mechanism
- Sinhala input and Sinhala output
- Fully offline local inference
- Streamlit chat interface
- Session-based chat history
- Model comparison panel
- Testing panel with predefined prompts
- Sinhala rewrite mechanism
- Chat export
- Python
- Streamlit
- OLLAMA
- Requests
app.py– main Streamlit appchatbot.py– model interaction and response logicprompts.py– system prompts and few-shot examplesui.py– UI rendering and stylingutils.py– helper functionsrequirements.txt– dependencies
- Install dependencies:
pip install -r requirements.txt
- Start OLLAMA:
ollama serve
- Pull required models:
ollama pull Tharusha_Dilhara_Jayadeera/singemma ollama pull llama3:latest
- Run the app:
streamlit run app.py
- SinGemma performed better overall in this implementation
- Llama 3 produced fewer usable outputs in the recorded test set
- Rewrite mechanism improved mixed-language output quality



