Skip to content

Latest commit

 

History

History
71 lines (44 loc) · 1.87 KB

README.md

File metadata and controls

71 lines (44 loc) · 1.87 KB

GPT2-SpongeBob

Run on Ainize

This project generates SpongeBob script using GPT-2 model.

Fine tuning data: Kaggle

Model download: Google dirve

Model information

Base model: gpt-2 large
Epoch: 50
Train runtime: 14723.0716
Loss: 0.0268

How to use:

* First, Choose SpongeBob character name.
* Second, Fill what the character will say in text. This will be base of script.
* And then, Fill number in length. Text is created as long as "length". I recommend between 100 and 300.
* If length is so big, generate time will be long.

Post parameter

name: The SpongeBob character name.
text: The base of script.
length: The size of generated text. (min: 50)

Output foramt

{"0": [[character name, dialog], [character name, dialog], ...]}

Image reference

static/README.md

* With CLI *

Input example

curl -X POST "https://master-gpt2-spongebob-fpem123.endpoint.ainize.ai/SpongeBob" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "name=SpongeBob" -F "text=Hello" -F "length=100"

Output example

{
  "0": [
    [
      "SpongeBob",
      " Hello, Patrick."
    ],
    [
      "Patrick",
      " [screams] Spiders! Get 'em off me! Get 'em off me! Get 'em off! Get 'em off, off me! Off, off, off! [In Patrick's mind"
    ]
  ]
}

* With swagger *

API page: Ainize

* With a Demo *

Demo page: End-point

--