-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSwagger.yaml
114 lines (95 loc) · 3.21 KB
/
Swagger.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
openapi: 3.0.0 # Open api version
info:
title: GPT2-Superhero
version: "v0.1"
contact:
name: AInizer - Lee hoseop
description: |
This app is generate Superhero story and power.
---
How to use:
* First, Fill what the text. This will be base of story and power.
* 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.
---
And you can use this in [demo page](https://master-gpt2-superheroes-fpem123.endpoint.ainize.ai/).
Fine tuning data reference >> [superheroes_nlp_dataset](https://www.kaggle.com/jonathanbesomi/superheroes-nlp-dataset)
servers:
- url: https://master-gpt2-superheroes-fpem123.endpoint.ainize.ai/
paths:
/superhero/story:
post:
requestBody:
required: true
description: |
This request will generate superhero story.
Request body example
text: Superman is
length: 150
curl example
curl -X POST "https://master-gpt2-superheroes-fpem123.endpoint.ainize.ai/superhero/story" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "text=superman is" -F "length=50"
content:
multipart/form-data:
schema:
type: object
properties:
text:
type: string
description: "Base text for generate."
length:
type: string
description: "The size of text."
required:
- text
- length
responses: # Set response
'200':
description: "Successful Response"
content:
application/json:
schema:
type: object
'400':
description: "Bad Request Error"
'429':
description: "Too many requests"
'500':
description: "Server-side Error"
/superhero/power:
post:
requestBody:
required: true
description: |
This request will generate superhero power.
Request body example
text: Superman is
length: 150
curl example
curl -X POST "https://master-gpt2-superheroes-fpem123.endpoint.ainize.ai/superhero/power" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "text=Superman is" -F "length=50"
content:
multipart/form-data:
schema:
type: object
properties:
text:
type: string
description: "Base text for generate"
length:
type: string
description: "The size of text."
required:
- text
- length
responses: # Set response
'200':
description: "Successful Response"
content:
application/json:
schema:
type: object
'400':
description: "Bad Request Error"
'429':
description: "Too many requests"
'500':
description: "Server-side Error"