Downloads · 30 days
27
2% of all-time downloads
ehdwns1516/gpt2_review_star2
gpt2_review_star2 is a text generation model from ehdwns1516. Use it when you need the model to write or continue text. It is set up for transformers.
This model has been trained as a reviewbody dataset with a star of 2 in the amazonreview dataset. Input text what you want to generate review. If the context is longer than 1200 characters, the context may be cut in t…
Downloads · 30 days
27
2% of all-time downloads
All-time downloads
1.4K
Public
Repo size
1 GB
Likes
0
Public
Click a slice to open those files.
.bin510 MB · 100%
From the Hugging Face model README
review generator DEMO: Ainize DEMO
review generator API: Ainize API
Language model: gpt2
Language: English
Training data: review_body dataset with a star of 2 in the amazon_review dataset.
Code: See Ainize Workspace
from transformers import AutoTokenizer, AutoModelWithLMHead
tokenizer = AutoTokenizer.from_pretrained("ehdwns1516/gpt2_review_star2")
model = AutoModelWithLMHead.from_pretrained("ehdwns1516/gpt2_review_star2")
generator = pipeline(
"text-generation",
model="ehdwns1516/gpt2_review_star2",
tokenizer=tokenizer
)
context = "your context"
result = dict()
result[0] = generator(context)[0]