Downloads · 30 days
238
1% of all-time downloads
HamidRezaAttar/gpt2-product-description-generator
gpt2-product-description-generator is a text generation model from HamidRezaAttar. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is fine-tuned using GPT-2 on amazon home products metadata. It can generate descriptions for your home products by getting a text prompt. https://github.com/HamidRezaAttar/GPT2-Home
Downloads · 30 days
238
1% of all-time downloads
All-time downloads
21.2K
Public
Repo size
1.8 GB
Likes
14
Public
Click a slice to open those files.
.bin510 MB · 79%
From the Hugging Face model README
This model is fine-tuned using GPT-2 on amazon home products metadata. It can generate descriptions for your home products by getting a text prompt. https://github.com/HamidRezaAttar/GPT2-Home
GPT-2 is a large transformer-based language model with 1.5 billion parameters, trained on a dataset of 8 million web pages. GPT-2 is trained with a simple objective: predict the next word, given all of the previous words within some text. The diversity of the dataset causes this simple goal to contain naturally occurring demonstrations of many tasks across diverse domains. GPT-2 is a direct scale-up of GPT, with more than 10X the parameters and trained on more than 10X the amount of data.
For testing model with special configuration, please visit Demo
For more detailed information about project development please refer to my blog post.
For best experience and clean outputs, you can use Live Demo mentioned above, also you can use the notebook mentioned in my GitHub
You can use this model directly with a pipeline for text generation.
>>> from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
>>> tokenizer = AutoTokenizer.from_pretrained("HamidRezaAttar/gpt2-product-description-generator")
>>> model = AutoModelForCausalLM.from_pretrained("HamidRezaAttar/gpt2-product-description-generator")
>>> generator = pipeline('text-generation', model, tokenizer=tokenizer, config={'max_length':100})
>>> generated_text = generator("This bed is very comfortable.")
@misc{GPT2-Home,
author = {HamidReza Fatollah Zadeh Attar},
title = {GPT2-Home the English home product description generator},
year = {2021},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/HamidRezaAttar/GPT2-Home}},
}