Back to all models
text-generation mask_token:
Query this model
πŸ”₯ This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint  

⚑️ Upgrade your account to access the Inference API

Share Copied link to clipboard

Monthly model downloads

pranavpsv/gpt2-genre-story-generator pranavpsv/gpt2-genre-story-generator
697 downloads
last 30 days

pytorch

tf

Contributed by

pranavpsv Pranav Vadrevu
3 models

How to use this model directly from the πŸ€—/transformers library:

			
Copy to clipboard
from transformers import AutoTokenizer, AutoModelWithLMHead tokenizer = AutoTokenizer.from_pretrained("pranavpsv/gpt2-genre-story-generator") model = AutoModelWithLMHead.from_pretrained("pranavpsv/gpt2-genre-story-generator")

GPT2 Genre Based Story Generator

Model description

GPT2 fine-tuned on genre-based story generation.

Intended uses

Used to generate stories based on user inputted genre and starting prompts.

How to use

Supported Genres

superhero, action, drama, horror, thriller, sci_fi

Input text format

<BOS> <genre> Some optional text...

Example: <BOS> <sci_fi> After discovering time travel,

# Example of usage
from transformers import pipeline

story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
print(story_gen("<BOS> <superhero> Batman"))

Training data

Initialized with pre-trained weights of "gpt2" checkpoint. Fine-tuned the model on stories of various genres.