aishu15 commited on
Commit
837e08c
·
verified ·
1 Parent(s): 6f7d5ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +46 -1
README.md CHANGED
@@ -3,4 +3,49 @@ license: apache-2.0
3
  language:
4
  - ta
5
  - en
6
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  language:
4
  - ta
5
  - en
6
+ pipeline_tag: text2text-generation
7
+ datasets:
8
+ - aishu15/aryaumeshl
9
+ ---
10
+
11
+ ## Usage
12
+
13
+ To use this model, you can either directly use the Hugging Face `transformers` library or you can use the model via the Hugging Face inference API.
14
+
15
+
16
+ ### Model Information
17
+
18
+ Training Details
19
+
20
+ - **This model has been fine-tuned for English to Tamil translation.**
21
+ - **Training Duration: Over 10 hours**
22
+ - **Loss Achieved: 0.6**
23
+ - **Model Architecture**
24
+ - **The model architecture is based on the Transformer architecture, specifically optimized for sequence-to-sequence tasks.**
25
+
26
+ ### Installation
27
+ To use this model, you'll need to have the `transformers` library installed. You can install it via pip:
28
+ ```bash
29
+ pip install transformers
30
+ ```
31
+ ### Via Transformers Library
32
+
33
+ You can use this model in your Python code like this:
34
+
35
+ ## Inference
36
+ 1. **How to use the model in our notebook**:
37
+ ```python
38
+ # Load model directly
39
+ import torch
40
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
41
+ checkpoint = "aishu15/English-to-Tamil"
42
+ tokenizer = AutoTokenizer.from_pretrained(checkpoint)
43
+ model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
44
+ def language_translator(text):
45
+ tokenized = tokenizer([text], return_tensors='pt')
46
+ out = model.generate(**tokenized, max_length=128)
47
+ return tokenizer.decode(out[0],skip_special_tokens=True)
48
+ text_to_translate = "hardwork never fail"
49
+ output = language_translator(text_to_translate)
50
+ print(output)
51
+ ```