maharshipandya commited on
Commit
37db783
1 Parent(s): 7914f68

Upload model

Browse files
Files changed (3) hide show
  1. README.md +25 -36
  2. config.json +1 -1
  3. tf_model.h5 +3 -0
README.md CHANGED
@@ -1,58 +1,47 @@
1
  ---
2
  license: creativeml-openrail-m
3
- language:
4
- - en
5
- library_name: transformers
6
- pipeline_tag: text-generation
7
  tags:
8
- - art
 
 
 
9
  ---
10
 
11
- # AnimeGPTSan (Fine-tuned for Anime synopsis)
 
12
 
13
- `AnimeGPTSan` is essentially the OpenAI's `GPT2` model fine-tuned on [this anime dataset](https://www.kaggle.com/datasets/marlesson/myanimelist-dataset-animes-profiles-reviews). This model can be used to generate new descriptions/synopses for anime, based on some input prompt.
14
 
15
- The original `GPT2` model can be found here: [OpenAI's GPT2 on HuggingFace](https://huggingface.co/gpt2)
 
16
 
17
- # Results
18
 
19
- - Input prompt
20
 
21
- `The shadow realm`
22
 
23
- - Outputs
24
 
25
- 1. `The shadow realm of the dark lord's hands will be invaded by the evil, demonic beasts. One day, the lord's minions, the Shattering Star God, awaken and attack the world...`
26
- 2. `The shadow realm of the Underworld awaits the demon lord Akito who is intent upon subjugating the human world. The Demon Lord is determined to destroy the world. He intends to use the "Dark Soul" as the catalyst...`
27
- 3. `The shadow realm is the source of many evil, but at its core, lies a magical weapon capable of killing any creature it touches. A group of teenagers in a high-tech school known as the Dark Knight Knights, nicknamed the "Darks," are a force that will...`
28
- 4. `The shadow realm has been awakened by the coming of the evil Demon King. The Shadow Warriors are a team of warriors who have been chosen to battle the Demon King with special powers...`
29
- 5. `The shadow realm exists between us and the demon world, and it is the source of the demons' power. The demons were sent to destroy the shadow realm, to make people mad. However, the evil spirit of the demon was able to...`
30
 
31
- # Usage
32
 
33
- The below code describes how to use `AnimeGPTSan` to generate anime synopsis given some input prompt.
34
 
35
- > Note: Make sure to use a GPU for faster responses
36
 
37
- ```python
38
- from transformers import GPT2LMHeadModel, GPT2Tokenizer
39
 
40
- anime_model = GPT2LMHeadModel.from_pretrained("maharshipandya/AnimeGPTSan")
41
- anime_tokenizer = GPT2Tokenizer.from_pretrained("maharshipandya/AnimeGPTSan")
 
42
 
43
- def generate_text(sequence):
44
- outputs = []
45
- ids = anime_tokenizer.encode(f"{sequence}", return_tensors="pt")
46
- final_outputs = anime_model.generate(ids, do_sample=True, max_length=200, top_k=40,
47
- top_p=0.95, temperature=1.0, num_return_sequences=10)
48
 
49
- for i, out in enumerate(final_outputs):
50
- output = anime_tokenizer.decode(out, skip_special_tokens=True)
51
- outputs.append(output)
52
 
53
- return outputs
54
 
55
- print(generate_text("The shadow realm")) # list of generated synopses
56
- ```
57
 
58
- In order to generate synopses without any prefix prompt, just give `"<|startoftext|>"` as the input prompt to `AnimeGPTSan`.
 
 
 
1
  ---
2
  license: creativeml-openrail-m
 
 
 
 
3
  tags:
4
+ - generated_from_keras_callback
5
+ model-index:
6
+ - name: AnimeGPTSan
7
+ results: []
8
  ---
9
 
10
+ <!-- This model card has been generated automatically according to the information Keras had access to. You should
11
+ probably proofread and complete it, then remove this comment. -->
12
 
13
+ # AnimeGPTSan
14
 
15
+ This model is a fine-tuned version of [maharshipandya/AnimeGPTSan](https://huggingface.co/maharshipandya/AnimeGPTSan) on an unknown dataset.
16
+ It achieves the following results on the evaluation set:
17
 
 
18
 
19
+ ## Model description
20
 
21
+ More information needed
22
 
23
+ ## Intended uses & limitations
24
 
25
+ More information needed
 
 
 
 
26
 
27
+ ## Training and evaluation data
28
 
29
+ More information needed
30
 
31
+ ## Training procedure
32
 
33
+ ### Training hyperparameters
 
34
 
35
+ The following hyperparameters were used during training:
36
+ - optimizer: None
37
+ - training_precision: float32
38
 
39
+ ### Training results
 
 
 
 
40
 
 
 
 
41
 
 
42
 
43
+ ### Framework versions
 
44
 
45
+ - Transformers 4.30.2
46
+ - TensorFlow 2.12.0
47
+ - Tokenizers 0.13.3
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "/content/animegptsan/",
3
  "activation_function": "gelu_new",
4
  "architectures": [
5
  "GPT2LMHeadModel"
 
1
  {
2
+ "_name_or_path": "maharshipandya/AnimeGPTSan",
3
  "activation_function": "gelu_new",
4
  "architectures": [
5
  "GPT2LMHeadModel"
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71bc723bddb8fb990c3785fb1169a6e9fa1f73b0419c70ee02cfd7160ca5c946
3
+ size 497941584