VikParuchuri / surya

OCR, layout analysis, reading order, table recognition in 90+ languages
https://www.datalab.to
GNU General Public License v3.0
14.29k stars 889 forks source link

可以提供HTTP API的接口么 #209

Closed llm163520 closed 1 month ago

llm163520 commented 1 month ago

可以提供HTTP API的接口么

wenerme commented 1 month ago

This is my simple API wrapper

https://github.com/wenerme/dockerfiles/tree/master/ml/surya-ocr

docker run --rm -it \
  -p 3000:3000 \
  -v /data/cache:/root/.cache/ \
  --name surya-ocr quay.io/wener/surya-ocr:latest

curl -X POST -F "images=@table.png" http://localhost:3000/tabled
llm163520 commented 1 month ago

This is my simple API wrapper

https://github.com/wenerme/dockerfiles/tree/master/ml/surya-ocr

docker run --rm -it \
  -p 3000:3000 \
  -v /data/cache:/root/.cache/ \
  --name surya-ocr quay.io/wener/surya-ocr:latest

curl -X POST -F "images=@table.png" http://localhost:3050/tabled

1、该示例端口是否不太对?应该是3000吧; 2、有更完整的api参数介绍么?

wenerme commented 1 month ago

This is my simple API wrapper https://github.com/wenerme/dockerfiles/tree/master/ml/surya-ocr

docker run --rm -it \
  -p 3000:3000 \
  -v /data/cache:/root/.cache/ \
  --name surya-ocr quay.io/wener/surya-ocr:latest

curl -X POST -F "images=@table.png" http://localhost:3050/tabled

1、该示例端口是否不太对?应该是3000吧; 2、有更完整的api参数介绍么?

make dev 是3050 /openapi.json 有fastapi 生成的文档

llm163520 commented 1 month ago

感谢!