Coder Social home page Coder Social logo

handwriting_ocr's Introduction

手写单据识别 handwriting_ocr

CI

基于百度云API讯飞云API的手写单据识别 demo app,同时使用了 streamlit 构建 UI 界面。

Handwriting OCR using Baidu cloud API and Xfyun API.

Running locally

Setup poetry (one time setup):

python -m pip install -U pip
python -m pip install poetry

Write your environment files:

# for xfyun, please generate your XF_APP_ID and XF_APP_KEY from https://www.xfyun.cn/doc/platform/quickguide.html
# for baidu, please generate your credentials from https://console.bce.baidu.com/ai/#/ai/ocr/app/list
# and put them here
echo > .env <<EOF
# 如果你用的是讯飞云 API
XF_APP_ID=<app_id>
XF_APP_KEY=<app_key>
# 如果你用的是百度 API,注意区分 APP/API
BAIDU_APP_ID=<app_id>
BAIDU_API_KEY=<app_key>
BAIDU_API_SECRET=<app_secret>
EOF

Running via poetry:

# install dependencies
poetry install --no-root
# run the app
poetry run streamlit run handwriting_ocr/app.py

Running via docker:

docker build -t handwriting_ocr .
docker run -p 8501:8501 -v $(pwd)/.env:/app/.env handwriting_ocr

Developing

If you have updated the dependencies, please run:

poetry lock

Formatting code using black and isort

poetry run isort . --profile black
poetry run black .

handwriting_ocr's People

Contributors

dependabot[bot] avatar jimexist avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.