forked from ainize-team/ainize-run-tensorflow-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.yaml
65 lines (64 loc) · 1.76 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
openapi: 3.0.0
info:
title: TensorFlow Resnet API by Ainize
version: 0.1.1
servers:
- url: https://endpoint.ainize.ai/hyunhyerim/tensorflow-serving-resnet/v1/models
paths:
/resnet:
get:
operationId: status
summary: Get status
responses:
'200':
description: 200 response
content:
application/json:
examples:
pooh:
value:
model_version_status:
- version: '1538687457'
state: 'AVAILABLE'
status:
error_code: 'OK'
error_message: ''
/resnet/metadata:
get:
operationId: metadata
summary: Get model's metadat
responses:
'200':
description: 200 response
/resnet:predict:
post:
operationId: predict
summary: Predict object class of given image
requestBody:
description: subscription payload
content:
application/json:
schema:
type: object
properties:
instances:
type: array
items:
type: object
properties:
b64:
type: string
format: byte # base64-encoded image file contents
responses:
'200':
description: 200 response
content:
application/json:
examples:
pooh:
value:
predictions:
- classes: 208
probabilities:
- '1.32371497e-06'
- '9.01561236e-07'