[SuperAI Engineer Season 2](https://superai.aiat.or.th/) , [Machima](https://machchima.superai.me/)

[Google's mT5](https://github.com/google-research/multilingual-t5) , [Pollawat](https://huggingface.co/Pollawat/mt5-small-thai-qg)

```python
from transformers import T5Tokenizer, T5ForConditionalGeneration, T5Config

model = T5ForConditionalGeneration.from_pretrained('SuperAI2-Machima/mt5-small-thai-yes-no-qg')
tokenizer = T5Tokenizer.from_pretrained('SuperAI2-Machima/mt5-small-thai-yes-no-qg')

source_text = 'บุกยึดไม้เถื่อน อดีต ส.ส.บุรีรัมย์ เตรียมสร้างคฤหาสน์ทรงไทย 1 กันยายน 2550 12:00 น. ตำรวจภูธรจ.บุรีรัมย์บุกตรวจยึดไม้แปรรูปหวงห้ามกว่า 80 แผ่น'

print('Predicted Summary Text : ')
tokenized_text = tokenizer.encode(source_text, return_tensors="pt").to(device)
summary_ids = model.generate(tokenized_text,
                                        num_beams=4,
                                        no_repeat_ngram_size=2,
                                        max_length=50,
                                        early_stopping=True)
output = tokenizer.decode(summary_ids[0], skip_special_tokens=True)
print(output)
#Predicted Summary Text : 
#answer: 80 แผ่น question: ตํารวจภูธรจ.บุรีรัมย์บุกตรวจยึดไม้แปรรูปหวงห้ามกว่ากี่แผ่น
```
{"language": ["thai", "th"], "license": "mit", "tags": ["Yes No question-generation"], "datasets": ["NSC2018", "wiki-documents-nsc", "ThaiQACorpus-DevelopmentDataset"], "widget": [{"text": "\u0e27\u0e31\u0e19\u0e17\u0e35\u0e48 1 \u0e01\u0e31\u0e19\u0e22\u0e32\u0e22\u0e19 2550 12:00 \u0e19. \u0e15\u0e33\u0e23\u0e27\u0e08\u0e20\u0e39\u0e18\u0e23\u0e08.\u0e1a\u0e38\u0e23\u0e35\u0e23\u0e31\u0e21\u0e22\u0e4c\u0e1a\u0e38\u0e01\u0e15\u0e23\u0e27\u0e08\u0e22\u0e36\u0e14\u0e44\u0e21\u0e49\u0e41\u0e1b\u0e23\u0e23\u0e39\u0e1b\u0e2b\u0e27\u0e07\u0e2b\u0e49\u0e32\u0e21\u0e01\u0e27\u0e48\u0e32 80 \u0e41\u0e1c\u0e48\u0e19", "example_title": "Example 01"}, {"text": "\u0e1e\u0e25\u0e40\u0e2d\u0e01 \u0e1b\u0e23\u0e30\u0e22\u0e38\u0e17\u0e18\u0e4c \u0e08\u0e31\u0e19\u0e17\u0e23\u0e4c\u0e42\u0e2d\u0e0a\u0e32 (\u0e40\u0e01\u0e34\u0e14 21 \u0e21\u0e35\u0e19\u0e32\u0e04\u0e21 \u0e1e.\u0e28. 2497) \u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e25\u0e48\u0e19 \u0e15\u0e39\u0e48 \u0e40\u0e1b\u0e47\u0e19\u0e19\u0e31\u0e01\u0e01\u0e32\u0e23\u0e40\u0e21\u0e37\u0e2d\u0e07\u0e41\u0e25\u0e30\u0e2d\u0e14\u0e35\u0e15\u0e19\u0e32\u0e22\u0e17\u0e2b\u0e32\u0e23\u0e1a\u0e01\u0e0a\u0e32\u0e27\u0e44\u0e17\u0e22", "example_title": "Example 02"}]}
transformers pytorch mt5 text2text-generation Yes No question-generation dataset:NSC2018 dataset:wiki-documents-nsc dataset:ThaiQACorpus-DevelopmentDataset license:mit autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #mt5 #text2text-generation #Yes No question-generation #dataset-NSC2018 #dataset-wiki-documents-nsc #dataset-ThaiQACorpus-DevelopmentDataset #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

SuperAI Engineer Season 2 , Machima

Google's mT5 , Pollawat


TAGS
#transformers #pytorch #mt5 #text2text-generation #Yes No question-generation #dataset-NSC2018 #dataset-wiki-documents-nsc #dataset-ThaiQACorpus-DevelopmentDataset #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 

passage: TAGS
#transformers #pytorch #mt5 #text2text-generation #Yes No question-generation #dataset-NSC2018 #dataset-wiki-documents-nsc #dataset-ThaiQACorpus-DevelopmentDataset #license-mit #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
