Spaces:
Sleeping
Sleeping
Update Readme.md
Browse files
Readme.md
CHANGED
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# 🌍 English-to-French Translation App
|
2 |
+
|
3 |
+
A Gradio web interface for translating English text to French using Hugging Face's T5 transformer models.
|
4 |
+
|
5 |
+

|
6 |
+
|
7 |
+
## Features
|
8 |
+
|
9 |
+
- **Model Selection**: Choose between different T5 model sizes
|
10 |
+
- `t5-small`: Faster inference
|
11 |
+
- `t5-base`: Higher quality translations
|
12 |
+
- **Customizable Length**: Control maximum translation output length
|
13 |
+
- **Example Texts**: Try pre-loaded examples with one click
|
14 |
+
- **Responsive Design**: Works on both desktop and mobile devices
|
15 |
+
|
16 |
+
## How to Use
|
17 |
+
|
18 |
+
1. **Input Text**:
|
19 |
+
- Type or paste English text in the input box
|
20 |
+
2. **Select Model**:
|
21 |
+
- Choose your preferred balance of speed vs quality
|
22 |
+
3. **Adjust Length** (Optional):
|
23 |
+
- Use the slider to control translation length
|
24 |
+
4. **Click Translate**:
|
25 |
+
- Get instant French translation
|
26 |
+
|
27 |
+
## Technical Details
|
28 |
+
|
29 |
+
### Models Used
|
30 |
+
- [T5-small](https://huggingface.co/t5-small) (60M parameters)
|
31 |
+
- [T5-base](https://huggingface.co/t5-base) (220M parameters)
|
32 |
+
|
33 |
+
### Dependencies
|
34 |
+
- Transformers >=4.30.0
|
35 |
+
- PyTorch >=1.10.0
|
36 |
+
- Gradio >=3.40.0
|
37 |
+
- SentencePiece (for tokenization)
|
38 |
+
|
39 |
+
## Deployment
|
40 |
+
|
41 |
+
This app is designed for easy deployment on [Hugging Face Spaces](https://huggingface.co/spaces):
|
42 |
+
|
43 |
+
1. Create a new Space
|
44 |
+
2. Add these files:
|
45 |
+
- `app.py` (main application)
|
46 |
+
- `requirements.txt` (dependencies)
|
47 |
+
3. The Space will automatically build and deploy
|
48 |
+
|
49 |
+
## Local Development
|
50 |
+
|
51 |
+
To run locally:
|
52 |
+
```bash
|
53 |
+
pip install -r requirements.txt
|
54 |
+
python app.py
|