Spaces:
Running
Running
A newer version of the Gradio SDK is available:
5.33.0
metadata
title: English to French Translator
emoji: π
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 5.29.0
app_file: app.py
pinned: true
license: apache-2.0
hardware:
accelerator: CPU
cpu: '2'
memory: 8GB
env:
- name: HF_TOKEN
description: Hugging Face API token for private models
required: false
datasets:
- opus_books
- wmt14
custom:
progress: 'true'
timeout: 300
docker:
parent_space: username/space-name
tags:
- translation
- nlp
- t5
- multilingual
- huggingface
π English-to-French Translation App
A Gradio web interface for translating English text to French using Hugging Face's T5 transformer models.
Encoder-Decoder Transformers (e.g., T5, BART, mT5) are comonly used for translation, summarization, question answering. They combine both encoder and decoder for input-output mappings.
Features
- Model Selection: Choose between different T5 model sizes
t5-small
: Faster inferencet5-base
: Higher quality translations
- Customizable Length: Control maximum translation output length
- Example Texts: Try pre-loaded examples with one click
- Responsive Design: Works on both desktop and mobile devices
How to Use
- Input Text:
- Type or paste English text in the input box
- Select Model:
- Choose your preferred balance of speed vs quality
- Adjust Length (Optional):
- Use the slider to control translation length
- Click Translate:
- Get instant French translation
Technical Details
Models Used
Dependencies
- Transformers >=4.30.0
- PyTorch >=1.10.0
- Gradio >=3.40.0
- SentencePiece (for tokenization)
Deployment
This app is designed for easy deployment on Hugging Face Spaces:
- Create a new Space
- Add these files:
app.py
(main application)requirements.txt
(dependencies)
- The Space will automatically build and deploy
Local Development
To run locally:
pip install -r requirements.txt
python app.py