create models
This commit is contained in:
29
README.md
29
README.md
@@ -109,7 +109,34 @@ Method | URL | Info
|
||||
-------|--------------------------------|------------------
|
||||
GET | /api/models?user=1234 | 按用戶ID篩選
|
||||
GET | /api/models?tag=xxx | 按標籤分類篩選
|
||||
DELETE | /api/model/{model_id} | 刪除指定模型
|
||||
POST | /api/models | 創建模型
|
||||
PATCH | /api/models/{model_id} | 修改模型
|
||||
DELETE | /api/models/{model_id} | 刪除指定模型
|
||||
|
||||
|
||||
POST /api/models
|
||||
```javascript
|
||||
// 發送數據
|
||||
{
|
||||
name: '', // 設定名稱
|
||||
type: '', // 指定訓練類型
|
||||
source: '', // 指定源模型ID
|
||||
data: {
|
||||
oss: [], // 直接上傳到OSS的圖片地址列表
|
||||
images: [], // 指定圖片的ID們
|
||||
choices: [], // 精選集的ID們
|
||||
}, // 指定數據集(可以是上傳到OSS的文件列表, 也可以是已有的圖片ID, 也可以是精選集ID)
|
||||
}
|
||||
|
||||
// 返回數據
|
||||
{
|
||||
id: 'xxx', // 模型ID
|
||||
name: '', // 模型名稱
|
||||
status: '', // 模型狀態(必須訓練完成的才可用)
|
||||
createdAt: '', // 創建時間
|
||||
updatedAt: '', // 更新時間
|
||||
}
|
||||
```
|
||||
|
||||
### 獲取標籤
|
||||
|
||||
|
Reference in New Issue
Block a user