Srini99 commited on
Commit
5488e4d
1 Parent(s): ab2a920

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -0
README.md ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ## Usage
2
+ ### In Transformers
3
+ ```python
4
+ from transformers import AutoModelForQuestionAnswering, AutoTokenizer, pipeline
5
+ model_name = "Srini99/FYP_TamilQA"
6
+
7
+ model = AutoModelForQuestionAnswering.from_pretrained(model_name)
8
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
9
+
10
+ nlp = pipeline('question-answering', model=model_name, tokenizer=model_name)
11
+ QA_input = {
12
+ 'question': 'யாரால் பொங்கல் சிறப்பாகக் கொண்டாடப்படுகிறது?',
13
+ 'context': 'பொங்கல் என்பது தமிழர்களால் சிறப்பாகக் கொண்டாடப்படும் ஓர் அறுவடைப் பண்டிகை ஆகும்.'
14
+ }
15
+ res = nlp(QA_input)
16
+ ```