Views
No views yet
1from simpletransformers.t5 import T5Model, T5Args
2from torch import cuda
3
4model = T5Model("t5", "thanathorn/mt5-cpe-kmutt-thai-sentence-sum", use_cuda=cuda.is_available())
5
6sentence = "simplify: ถ้าพูดถึงขนมหวานในตำนานที่ชื่นใจที่สุดแล้วละก็ต้องไม่พ้น น้ำแข็งใส แน่เพราะว่าเป็นอะไรที่ชื่นใจสุด"
7prediction = model.predict([sentence])
8print(prediction[0])