SuperAPI AI Directory

zhipu-ocr

General & other

View repository

Updated 10-15 21:47

About this skill

Zhipu OCR Text Recognition

Use the GLM-4V-Flash vision model to recognize text in images.

Installation

git clone https://github.com/Wcowin/zhipu-OCR-skill.git
cd zhipu-OCR-skill
pip install -r requirements.txt

Usage

python3 scripts/ocr.py <图片路径> [提示词]
  • <图片路径>: Required, image file path
  • [提示词]: Optional, default "Please recognize all text in the image and output it completely"
  • -v: Show detailed output

Configuration

Set the environment variable ZHIPUAI_API_KEY(obtained from https://open.bigmodel.cn/usercenter/apikeys ).

Supported Formats

Common image formats such as JPG, PNG, GIF, BMP, WebP.

Use Cases

  • The user sends an image and requests text recognition
  • Screenshot text extraction
  • Scanned document OCR
  • Table content recognition
  • Handwritten text recognition

Notes

  • A valid Zhipu AI API Key is required
  • A network connection is required to access the API