suriya7 commited on
Commit
6110224
1 Parent(s): fb0eaf5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -0
README.md CHANGED
@@ -1,3 +1,48 @@
1
  ---
2
  license: mit
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
  ---
4
+ ---
5
+ license: mit
6
+ datasets: Hemanth-thunder/en_ta
7
+ language:
8
+ - ta
9
+ - en
10
+ widget:
11
+ - text: Actor Vijay is competing an 2026 election.
12
+ - text: you have to study well for exams
13
+ - text: The Sun is approximately 4.6 billion years older than Earth.
14
+ pipeline_tag: text2text-generation
15
+ ---
16
+
17
+ ## Model Details
18
+ - **Model Name**: English-Tamil-Translator
19
+ - **Model Type**: Deep Learning Model
20
+ - **Language**: Python
21
+ - **Task**: Language Translation
22
+
23
+ ## How to Use
24
+ 1. **Install Gemma Python Package**:
25
+ ```bash
26
+ pip install -q -U transformers==4.38.0
27
+ ```
28
+
29
+ ## Inference
30
+ 1. **How to use the model in our notebook**:
31
+ ```python
32
+ # Load model directly
33
+ import torch
34
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
35
+
36
+ checkpoint = "Mr-Vicky-01/English-Tamil-Translator"
37
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
38
+ model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
39
+
40
+ def language_translator(text):
41
+ tokenized = tokenizer([text], return_tensors='pt')
42
+ out = model.generate(**tokenized, max_length=128)
43
+ return tokenizer.decode(out[0],skip_special_tokens=True)
44
+
45
+ text_to_translate = "i have to play football now!"
46
+ output = language_translator(text_to_translate)
47
+ print(output)
48
+ ```