Views
No views yet
1from transformers import T5Tokenizer, T5ForConditionalGeneration
2
3tokenizer = T5Tokenizer.from_pretrained("ThomasNLG/t5-qa_webnlg_synth-en")
4
5model = T5ForConditionalGeneration.from_pretrained("ThomasNLG/t5-qa_webnlg_synth-en")text_input = "{QUESTION} </s> {CONTEXT}"CONTEXT is a structured table that is linearised this way:CONTEXT = "name [ The Eagle ] , eatType [ coffee shop ] , food [ French ] , priceRange [ £ 2 0 - 2 5 ]"1@article{rebuffel2021data,
2 title={Data-QuestEval: A Referenceless Metric for Data to Text Semantic Evaluation},
3 author={Rebuffel, Cl{\'e}ment and Scialom, Thomas and Soulier, Laure and Piwowarski, Benjamin and Lamprier, Sylvain and Staiano, Jacopo and Scoutheeten, Geoffrey and Gallinari, Patrick},
4 journal={arXiv preprint arXiv:2104.07555},
5 year={2021}
6}