aishu15 commited on
Commit
1d17a0d
·
verified ·
1 Parent(s): d55cd12

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +38 -0
README.md ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - ta
5
+ license: cc-by-4.0
6
+ tags:
7
+ - translation
8
+ - tamil
9
+ - colloquial-tamil
10
+ - fine-tuned
11
+ - text-to-text
12
+
13
+
14
+
15
+ ## 🔥 Example Usage
16
+
17
+ Load and test the model using **Hugging Face Transformers**:
18
+
19
+ ```python
20
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
21
+ # Load model and tokenizer
22
+ model_name = "aishu15/colloquial-tamil"
23
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
24
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
25
+ # Function to translate text
26
+ def translate(text):
27
+ inputs = tokenizer(text, return_tensors="pt")
28
+ outputs = model.generate(**inputs, max_length=128)
29
+ return tokenizer.decode(outputs[0], skip_special_tokens=True)
30
+ # Example translations
31
+ test_sentences = [
32
+ "This is so beautiful",
33
+ "Bro, are you coming or not?",
34
+ "My mom is gonna kill me if I don't reach home now!"
35
+ ]
36
+ for sentence in test_sentences:
37
+ print(f"English: {sentence}")
38
+ print(f"Colloquial Tamil: {translate(sentence)}\n")