Spaces:
Runtime error
Runtime error
Create openapi.yaml
Browse files- .well-known/openapi.yaml +39 -0
.well-known/openapi.yaml
ADDED
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
openapi: 3.1.0
|
2 |
+
info:
|
3 |
+
title: TurkeyEngineer Segment API
|
4 |
+
version: 1.0.0
|
5 |
+
description: 呼叫 Hugging Face 上的斷詞 API,將中文句子依字分開。
|
6 |
+
servers:
|
7 |
+
- url: https://turkeyengineer-test.hf.space
|
8 |
+
description: Hugging Face Space hosting the segment API
|
9 |
+
paths:
|
10 |
+
/run/predict:
|
11 |
+
post:
|
12 |
+
operationId: segmentChineseText
|
13 |
+
summary: 將中文句子依字分開
|
14 |
+
requestBody:
|
15 |
+
required: true
|
16 |
+
content:
|
17 |
+
application/json:
|
18 |
+
schema:
|
19 |
+
type: object
|
20 |
+
properties:
|
21 |
+
data:
|
22 |
+
type: array
|
23 |
+
items:
|
24 |
+
type: string
|
25 |
+
description: 要處理的中文句子陣列
|
26 |
+
required:
|
27 |
+
- data
|
28 |
+
responses:
|
29 |
+
'200':
|
30 |
+
description: 成功的回應分詞結果
|
31 |
+
content:
|
32 |
+
application/json:
|
33 |
+
schema:
|
34 |
+
type: object
|
35 |
+
properties:
|
36 |
+
data:
|
37 |
+
type: array
|
38 |
+
items:
|
39 |
+
type: string
|