Skip to content

NikiniYathra/sinhala_offline_chatbot

Repository files navigation

Sinhala Offline Chatbot

Fully offline Sinhala chatbot Local inference with OLLAMA Streamlit-based interactive UI Prompt engineering + rewrite mechanism

Features

  • 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

Technologies

  • Python
  • Streamlit
  • OLLAMA
  • Requests

Project Structure

  • app.py – main Streamlit app
  • chatbot.py – model interaction and response logic
  • prompts.py – system prompts and few-shot examples
  • ui.py – UI rendering and styling
  • utils.py – helper functions
  • requirements.txt – dependencies

How to Run

  1. Install dependencies:
    pip install -r requirements.txt
  2. Start OLLAMA:
    ollama serve
  3. Pull required models:
    ollama pull Tharusha_Dilhara_Jayadeera/singemma
    ollama pull llama3:latest
  4. Run the app:
    streamlit run app.py
    

Evaluation Summary

  • 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

Screenshots

Main Chat Interface

Main Chat Interface

Sinhala Interaction Example

Sinhala Interaction

Model Comparison Panel

Model Comparison

Testing Panel

Testing Panel

About

Offline Sinhala chatbot using Streamlit and OLLAMA with prompt engineering, model comparison, and testing panel.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages