Pet project of mine to build a web application for translating English and Kinyarwanda using nmt api via a chat inferface
# Clara - Translation Assistant
A Streamlit web application for translating between English and Kinyarwanda using the NMT API.
## Features
- π Translate between English and Kinyarwanda
- π¬ Chat-style interface with message history
- π± Responsive design for mobile, tablet, and desktop
- π¨ Modern blue-themed UI inspired by popular messenger apps
- βοΈ Customizable language selection
- ποΈ Clear chat history
## API
This app uses the Neural Machine Translation API from umuganda.digital.
Supported language pairs:
- English β Kinyarwanda
- Kinyarwanda β English
## Installation
1. Clone the repository:
```bash
git clone
github.com
cd clara
```
2. Create a virtual environment:
```bash
python3.11 -m venv venv
```
3. Activate the virtual environment:
```bash
# On Windows
.\venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
```
4. Install dependencies:
```bash
pip install -r requirements.txt
```
## Usage
Run the Streamlit app:
```bash
streamlit run main.py
```
The app will open at `
localhost`
## Project Structure
```
clara/
βββ main.py # Streamlit application
βββ test_api.py # API testing script
βββ api_mapping.json # API test results
βββ NMT_API_DOCUMENTATION.md # API documentation
βββ requirements.txt # Dependencies
βββ .streamlit/
β βββ config.toml # Streamlit configuration
βββ README.md
```
## Dependencies
- streamlit >= 1.28.0
- requests >= 2.31.0
## License
MIT