Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
tags:
|
| 7 |
+
- Question Answering
|
| 8 |
+
datasets:
|
| 9 |
+
- yahoo_answers_qa
|
| 10 |
+
metrics:
|
| 11 |
+
- rouge
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Y5 Bot
|
| 15 |
+
|
| 16 |
+
Y5 Bot is a text2text transfer transformer model woking in English Language.
|
| 17 |
+
|
| 18 |
+
It is lightweight, fast, and easy to use for text generation.
|
| 19 |
+
|
| 20 |
+
# How to use
|
| 21 |
+
|
| 22 |
+
```
|
| 23 |
+
pip install transformers
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
```python
|
| 27 |
+
model = T5ForConditionalGeneration.from_pretrained("jojo-ai-mst/Y5Bot")
|
| 28 |
+
tokenizer = T5Tokenizer.from_pretrained("jojo-ai-mst/Y5Bot")
|
| 29 |
+
|
| 30 |
+
my_question = "What do you think about the benefit of Artificial Intelligence?"
|
| 31 |
+
inputs = "Please answer to this question: " + my_question
|
| 32 |
+
|
| 33 |
+
inputs = tokenizer(inputs, return_tensors="pt")
|
| 34 |
+
outputs = model.generate(**inputs)
|
| 35 |
+
answer = tokenizer.decode(outputs[0])
|
| 36 |
+
|
| 37 |
+
print(answer)
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
# References
|
| 41 |
+
|
| 42 |
+
- [https://arxiv.org/abs/1910.10683](https://arxiv.org/abs/1910.10683)
|