rahimizadeh commited on
Commit
d0b7696
·
verified ·
1 Parent(s): b50745d

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -14
README.md CHANGED
@@ -1,14 +1,56 @@
1
- ---
2
- title: Translation With T5
3
- emoji: 🏢
4
- colorFrom: yellow
5
- colorTo: purple
6
- sdk: gradio
7
- sdk_version: 5.29.0
8
- app_file: app.py
9
- pinned: false
10
- license: mit
11
- short_description: Encoder-Decoder
12
- ---
13
-
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ Encoder-Decoder Transformers (e.g., T5, BART, mT5) are comonly used for translation, summarization, question answering.
6
+ They combine both encoder and decoder for input-output mappings.
7
+
8
+
9
+ ## Features
10
+
11
+ - **Model Selection**: Choose between different T5 model sizes
12
+ - `t5-small`: Faster inference
13
+ - `t5-base`: Higher quality translations
14
+ - **Customizable Length**: Control maximum translation output length
15
+ - **Example Texts**: Try pre-loaded examples with one click
16
+ - **Responsive Design**: Works on both desktop and mobile devices
17
+
18
+ ## How to Use
19
+
20
+ 1. **Input Text**:
21
+ - Type or paste English text in the input box
22
+ 2. **Select Model**:
23
+ - Choose your preferred balance of speed vs quality
24
+ 3. **Adjust Length** (Optional):
25
+ - Use the slider to control translation length
26
+ 4. **Click Translate**:
27
+ - Get instant French translation
28
+
29
+ ## Technical Details
30
+
31
+ ### Models Used
32
+ - [T5-small](https://huggingface.co/t5-small) (60M parameters)
33
+ - [T5-base](https://huggingface.co/t5-base) (220M parameters)
34
+
35
+ ### Dependencies
36
+ - Transformers >=4.30.0
37
+ - PyTorch >=1.10.0
38
+ - Gradio >=3.40.0
39
+ - SentencePiece (for tokenization)
40
+
41
+ ## Deployment
42
+
43
+ This app is designed for easy deployment on [Hugging Face Spaces](https://huggingface.co/spaces):
44
+
45
+ 1. Create a new Space
46
+ 2. Add these files:
47
+ - `app.py` (main application)
48
+ - `requirements.txt` (dependencies)
49
+ 3. The Space will automatically build and deploy
50
+
51
+ ## Local Development
52
+
53
+ To run locally:
54
+ ```bash
55
+ pip install -r requirements.txt
56
+ python app.py