Downloads · 30 days
2.1K
9% of all-time downloads
Ateeqq/news-title-generator
news-title-generator is a machine learning model from Ateeqq. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
This document details the development of our innovative News Title Generator, designed to produce compelling and informative titles for your news articles. Check the Live Demo Here.
Downloads · 30 days
2.1K
9% of all-time downloads
All-time downloads
23.4K
Public
Parameters
223M
1.8 GB on disk
Likes
10
Public
Click a slice to open those files.
.bin892 MB · 50%
From the Hugging Face model README
This document details the development of our innovative News Title Generator, designed to produce compelling and informative titles for your news articles. Check the Live Demo Here.
I've tested several other news headline generators on Hugging Face and across the internet, and I can confidently say that this one is the best. 🤗
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Ateeqq/news-title-generator")
model = AutoModelForSeq2SeqLM.from_pretrained("Ateeqq/news-title-generator")
def generate_title(input_text):
input_ids = tokenizer.encode(input_text, return_tensors="pt")
output = model.generate(input_ids)
decoded_text = tokenizer.decode(output[0], skip_special_tokens=True)
return decoded_text
input_text = """Microsoft is opening a new office in London dedicated to artificial
intelligence (AI) research and development. The tech firm's AI boss Mustafa
Suleyman said it will advertise roles for exceptional individuals in the
coming weeks and months. But he has not said how many jobs will be created.
Microsoft is a major investor in ChatGPT-creator OpenAI, which itself opened
an office in London in 2023."""
generated_title = generate_title(input_text)
print(generated_title)
Microsoft to open new London office dedicated to AI research
Our News Title Generator leverages the power of the T5 base model, fine-tuned on a comprehensive news title dataset, to deliver exceptional results. The model's architecture and training configuration are meticulously designed to produce high-quality, informative titles within an appropriate character length. This tool empowers creators and journalists to craft impactful headlines that effectively capture readers' attention.
Contact us (at exnrt.com/contact-us) today to learn more about integrating the News Title Generator into your editorial workflow and unlock the full potential of AI-driven journalism.