NEWS: Health experts said it is too early to predict whether demand would match up with the 171 million doses of the new boosters the U.S. ordered for the fall.\n\n HEADLINE:

from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("utkan/gpt2-news-headlines-v1")
model = AutoModelForCausalLM.from_pretrained("utkan/gpt2-news-headlines-v1")
device = "cuda" # or "cpu" 
input_text = "NEWS: Health experts said it is too early to predict whether demand would match up with the 171 million doses of the new boosters the U.S. ordered for the fall.\n\n HEADLINE:"
x = tokenizer([input_text], return_tensors='pt').input_ids.to(device)
y = model.generate(x, max_new_tokens=1)
tokenizer.batch_decode(y, skip_special_tokens=True)[0].split("HEADLINE: ")[-1]