Skip to content

Repository files navigation

Translation_App

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.

Features

  • 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

Technologies Used

Getting Started

Prerequisites

  • Python 3.9 or higher
  • API key for OpenAI
  • pip for installing dependencies

Installation

  1. Clone the repository:

    git clone https://github.com/berrygrant/Translation_App.git
    cd Translation_App
  2. Install dependencies:

    pip install -r requirements.txt
  3. Add your API keys in .streamlit/secrets.toml:

    [OPENAI]
    api_key = "your-openai-api-key"
  4. Run the app:

    streamlit run run_app.py

File Structure

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

Usage

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

License

MIT License. See the LICENSE file for details.

Contact

Created by Grant Berry – feel free to reach out for questions or collaborations.

About

Simple app designed using Streamlit for undergraduate introductory course on Spanish-English translation. Allows translation quality analysis and fine-tuning via OpenAI API.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages