Transformers
PyTorch
English
t5
text2text-generation
qa
Question Answering
text-generation-inference
Instructions to use Narrativa/byt5-base-finetuned-tweet-qa with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Narrativa/byt5-base-finetuned-tweet-qa with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Narrativa/byt5-base-finetuned-tweet-qa") model = AutoModelForSeq2SeqLM.from_pretrained("Narrativa/byt5-base-finetuned-tweet-qa", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -38,7 +38,7 @@ Sample
|
|
| 38 |
{
|
| 39 |
"Question": "who is the tallest host?",
|
| 40 |
"Answer": ["sam bee","sam bee"],
|
| 41 |
-
"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",
|
| 42 |
"qid": "3554ee17d86b678be34c4dc2c04e334f"
|
| 43 |
}
|
| 44 |
```
|
|
@@ -79,10 +79,11 @@ def get_answer(question, context):
|
|
| 79 |
return tokenizer.decode(output[0], skip_special_tokens=True)
|
| 80 |
|
| 81 |
|
| 82 |
-
context = "
|
| 83 |
-
question =
|
| 84 |
|
| 85 |
get_answer(question, context)
|
|
|
|
| 86 |
```
|
| 87 |
|
| 88 |
Created by: [Narrativa](https://www.narrativa.com/)
|
|
|
|
| 38 |
{
|
| 39 |
"Question": "who is the tallest host?",
|
| 40 |
"Answer": ["sam bee","sam bee"],
|
| 41 |
+
"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",
|
| 42 |
"qid": "3554ee17d86b678be34c4dc2c04e334f"
|
| 43 |
}
|
| 44 |
```
|
|
|
|
| 79 |
return tokenizer.decode(output[0], skip_special_tokens=True)
|
| 80 |
|
| 81 |
|
| 82 |
+
context = "MONSTARS BASKETBALL @M0NSTARSBBALLWiggins answers Kemba's floater with a three! game tied 106-106. 8.9 to play. CHA ball!12/4/2016, 2:26:30 AM"
|
| 83 |
+
question = 'who answered kemba\'s "floater"?'
|
| 84 |
|
| 85 |
get_answer(question, context)
|
| 86 |
+
# wiggins
|
| 87 |
```
|
| 88 |
|
| 89 |
Created by: [Narrativa](https://www.narrativa.com/)
|