This is a simple web application built with Streamlit that allows users to translate text between multiple languages using pre-trained models from Hugging Face's Transformers library.
- Supports translation between:
- English and Spanish
- Spanish and English
- French and English
- English and French
- German and English
- English and German
- Saves translations to a text file (
translations.txt
). - Logs user actions and errors to a log file (
log.txt
). - User feedback on translation usefulness.
To run this application, you need to have Python installed along with the following libraries:
- Streamlit
- Transformers
- Logging
- Regex
You can install the required packages using pip:
pip install r requirements.txt
- Clone this repository or download the script.
- Navigate to the directory containing the script.
- Run the Streamlit application using the following command:
streamlit run translator_app.py
- Open the URL provided in your terminal (usually
http://localhost:8501
).
- Select the desired translation language from the dropdown menu.
- Enter the text you want to translate (up to 500 characters).
- Click the "Translate" button.
- The translated text will be displayed, and you can choose to save it or provide feedback.
The application logs user interactions and any errors that occur during the translation process. You can check log.txt
for this information.