HamidRezaAttar's picture
Update README.md
d3eae96
|
raw
history blame
2.19 kB
metadata
language: en
tags:
  - text-generation
license: apache-2.0
widget:
  - text: >-
      Maximize your bedroom space without sacrificing style with the storage
      bed.
  - text: >-
      Handcrafted of solid acacia in weathered gray, our round Jozy drop-leaf
      dining table is a space-saving.
  - text: >-
      Our plush and luxurious Emmett modular sofa brings custom comfort to your
      living space.

HomeGPT2

This model is fine-tuned using GPT-2 on amazon products metadata. It can generate descriptions for your home products by getting a text prompt.

Model description

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.

How to use

For best experience and clean outputs, please use the notebook mentioned in my GitHub

Also, 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.")

Citation info

@misc{HomeGPT2,
  author = {HamidReza Fatollah Zadeh Attar},
  title = {HomeGPT2 the English product description generator},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/HamidRezaAttar/gpt-2-home-product-description-generation}},
}