
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]
```
{}
transformers pytorch gpt2 text-generation autotrain_compatible endpoints_compatible text-generation-inference region:us
TAGS
#transformers #pytorch #gpt2 #text-generation #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 


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:


TAGS
#transformers #pytorch #gpt2 #text-generation #autotrain_compatible #endpoints_compatible #text-generation-inference #region-us 
