-
Notifications
You must be signed in to change notification settings - Fork 3
/
Swagger.yaml
79 lines (69 loc) · 2.24 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
openapi: 3.0.0 # Open api version
info:
title: GPT2-Fairytale
version: "v0.1"
contact:
name: AInizer - Lee hoseop
description: |
This app is generate fairytale.
---
How to use:
* First, Fill what the base text. This will be base of Fairytale.
* 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-fairy-tales-fpem123.endpoint.ainize.ai/).
Fine tuning data reference >> [Fairy Tales](https://www.kaggle.com/cuddlefish/fairy-tales)
servers:
- url: https://feature-add-torch-serve-gpt-2-server-gkswjdzz.endpoint.ainize.ai
paths:
/infer/GPT2-large_Fairytale:
post:
requestBody:
required: true
description: |
This request will generate fairytale story.
Request body example
name: One day,
length: 150
curl example
curl -X 'POST' \
'https://feature-add-torch-serve-gpt-2-server-gkswjdzz.endpoint.ainize.ai/infer/GPT2-large_Fairytale' \
-H 'accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"text": "One day,",
"num_samples": 1,
"length": 300
}'
content:
'application/json':
schema:
type: object
properties:
text:
type: string
description: "Your Fairytale base."
num_samples:
type: integer
length:
type: integer
description: "The size of text."
example: {
"text": "One day,",
"num_samples": 1,
"length": 300
}
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"