The hub will probably assigns the Text2TextGeneration pipeline for T5 models, in that case it won’t use any prefix automatically. So you should put the prefix text  for the tasks in the widget text. And add a note in the model card that to use the model for different task the user should put the prefix himself.
See for reference valhalla/t5-small-qa-qg-hl · Hugging Face 28