init
This commit is contained in:
@@ -0,0 +1 @@
|
||||
将用于测试的图片命名为 `receipt.jpg` 放在此目录,或者修改 `http/ocr-server.http` 中的图片路径。
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 126 KiB |
@@ -0,0 +1,37 @@
|
||||
@host = http://127.0.0.1:8000
|
||||
|
||||
### 健康检查
|
||||
GET {{host}}/healthz
|
||||
|
||||
### 上传图片
|
||||
# @name uploadImage
|
||||
POST {{host}}/api/v1/upload
|
||||
Content-Type: multipart/form-data; boundary=ocrBoundary
|
||||
|
||||
--ocrBoundary
|
||||
Content-Disposition: form-data; name="file"; filename="general_ocr_002.png"
|
||||
Content-Type: image/jpeg
|
||||
|
||||
< ./fixtures/general_ocr_002.png
|
||||
--ocrBoundary--
|
||||
|
||||
> {% client.global.set("fileId", response.body.data.file_id); %}
|
||||
|
||||
### 使用上传返回的 file_id 识别文字
|
||||
# 先执行上面的上传请求,IDEA 会自动保存返回的 file_id。
|
||||
POST {{host}}/api/v1/i2t
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"file_id": "{{fileId}}",
|
||||
"min_confidence": 0.0
|
||||
}
|
||||
|
||||
### 识别并过滤低置信度文本
|
||||
POST {{host}}/api/v1/i2t
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"file_id": "{{fileId}}",
|
||||
"min_confidence": 0.8
|
||||
}
|
||||
Reference in New Issue
Block a user