YAML Metadata
Warning:
empty or missing yaml metadata in repo card
(https://huggingface.co/docs/hub/model-cards#model-card-metadata)
gpt2_review_star5
- This model has been trained as a review_body dataset with a star of 5 in the amazon_review dataset.
- Input text what you want to generate review.
- If the context is longer than 1200 characters, the context may be cut in the middle and the result may not come out well.
review generator DEMO: Ainize DEMO
review generator API: Ainize API
Model links for each 1 to 5 star
- ehdwns1516/gpt2_review_star1
- ehdwns1516/gpt2_review_star2
- ehdwns1516/gpt2_review_star3
- ehdwns1516/gpt2_review_star4
- ehdwns1516/gpt2_review_star5
Overview
Language model: gpt2
Language: English
Training data: review_body dataset with a star of 5 in the amazon_review dataset.
Code: See Ainize Workspace
Usage
In Transformers
from transformers import AutoTokenizer, AutoModelWithLMHead
tokenizer = AutoTokenizer.from_pretrained("ehdwns1516/gpt2_review_star5")
model = AutoModelWithLMHead.from_pretrained("ehdwns1516/gpt2_review_star5")
generator = pipeline(
"text-generation",
model="ehdwns1516/gpt2_review_star5",
tokenizer=tokenizer
)
context = "your context"
result = dict()
result[0] = generator(context)[0]
- Downloads last month
- 21
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.