Migrate model card from transformers-repo
Browse filesRead announcement at https://discuss.huggingface.co/t/announcement-all-model-cards-will-be-migrated-to-hf-co-model-repos/2755
Original file history: https://github.com/huggingface/transformers/commits/master/model_cards/pranavpsv/gpt2-genre-story-generator/README.md
README.md
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# GPT2 Genre Based Story Generator
|
3 |
+
|
4 |
+
## Model description
|
5 |
+
|
6 |
+
GPT2 fine-tuned on genre-based story generation.
|
7 |
+
|
8 |
+
## Intended uses
|
9 |
+
|
10 |
+
Used to generate stories based on user inputted genre and starting prompts.
|
11 |
+
|
12 |
+
## How to use
|
13 |
+
|
14 |
+
#### Supported Genres
|
15 |
+
superhero, action, drama, horror, thriller, sci_fi
|
16 |
+
#### Input text format
|
17 |
+
\<BOS> \<genre> Some optional text...
|
18 |
+
|
19 |
+
**Example**: \<BOS> \<sci_fi> After discovering time travel,
|
20 |
+
|
21 |
+
```python
|
22 |
+
# Example of usage
|
23 |
+
from transformers import pipeline
|
24 |
+
|
25 |
+
story_gen = pipeline("text-generation", "pranavpsv/gpt2-genre-story-generator")
|
26 |
+
print(story_gen("<BOS> <superhero> Batman"))
|
27 |
+
|
28 |
+
```
|
29 |
+
|
30 |
+
## Training data
|
31 |
+
|
32 |
+
Initialized with pre-trained weights of "gpt2" checkpoint. Fine-tuned the model on stories of various genres.
|