print('###### LANGUAGES ######') input_text = "i have question and answere.\ the question is : How many cars here ?\ the response is : 2\ with this information, can you crate an answere phrase" from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large") input_ids = tokenizer(input_text, return_tensors="pt").input_ids outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) def longText(input_text): tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large") input_ids = tokenizer(input_text, return_tensors="pt").input_ids outputs = model.generate(input_ids) return tokenizer.decode(outputs[0])