Narrativa commited on
Commit
d0eaf48
1 Parent(s): f365c28

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -3
README.md CHANGED
@@ -36,7 +36,7 @@ Sample
36
  {
37
  "Question": "who is the tallest host?",
38
  "Answer": ["sam bee","sam bee"],
39
- "Tweet": "Don't believe @ConanOBrien's height lies. Sam Bee is the tallest host in late night. #alternativefacts\\u2014 Full Frontal (@FullFrontalSamB) January 22, 2017",
40
  "qid": "3554ee17d86b678be34c4dc2c04e334f"
41
  }
42
  ```
@@ -75,9 +75,12 @@ def get_answer(question, context):
75
  attention_mask = inputs.attention_mask.to('cuda')
76
  output = model.generate(input_ids, attention_mask=attention_mask)
77
  return tokenizer.decode(output[0], skip_special_tokens=True)
 
 
 
 
78
 
79
-
80
- get_answer('here goes your question', 'And here the context/tweet...')
81
  ```
82
 
83
  Created by: [Narrativa](https://www.narrativa.com/)
 
36
  {
37
  "Question": "who is the tallest host?",
38
  "Answer": ["sam bee","sam bee"],
39
+ "Tweet": "Don't believe @ConanOBrien's height lies. Sam Bee is the tallest host in late night. #alternativefacts\\\\u2014 Full Frontal (@FullFrontalSamB) January 22, 2017",
40
  "qid": "3554ee17d86b678be34c4dc2c04e334f"
41
  }
42
  ```
 
75
  attention_mask = inputs.attention_mask.to('cuda')
76
  output = model.generate(input_ids, attention_mask=attention_mask)
77
  return tokenizer.decode(output[0], skip_special_tokens=True)
78
+
79
+
80
+ context = "Don't believe @ConanOBrien's height lies. Sam Bee is the tallest host in late night. #alternativefacts\\\\u2014 Full Frontal (@FullFrontalSamB) January 22, 2017"
81
+ question = "who is the tallest host?"
82
 
83
+ get_answer(question, context)
 
84
  ```
85
 
86
  Created by: [Narrativa](https://www.narrativa.com/)