Translation_App is a web-based tool for comparing and evaluating machine translation outputs originally designed as a project in Dr. Berry's Intro to Spanish Translation course. It allows users to input text, receive translations from different models (e.g., ChatGPT 4o-mini), and rate or compare the results. This app is built with Streamlit for rapid interface development and is designed to support teaching and research in translation and natural language processing.
- Translate between multiple languages
- Compare translations from different models
- Rate and annotate translations for quality and accuracy
- Export evaluation results for further analysis
- Supports API key management via
secrets.toml
- Python 3.9 or higher
- API key for OpenAI
pipfor installing dependencies
-
Clone the repository:
git clone https://github.com/berrygrant/Translation_App.git cd Translation_App -
Install dependencies:
pip install -r requirements.txt
-
Add your API keys in
.streamlit/secrets.toml:[OPENAI] api_key = "your-openai-api-key"
-
Run the app:
streamlit run run_app.py
Translation_App/
├── run_app.py # Entry point for the Streamlit app
├── translation.py # Translation logic and API handlers
├── evaluation.py # Evaluation logic and scoring
├── utils.py # Utility functions
├── data/ # Sample input/output data
├── .streamlit/ # Config and secrets
└── requirements.txt # Required Python packages
Use the interface to:
- Enter source text and select a target language
- View translations from selected providers
- Rate translations or choose the best one
- Export results as CSV
MIT License. See the LICENSE file for details.
Created by Grant Berry – feel free to reach out for questions or collaborations.