CoolFace
Apppublic

arslan911/qwen2-vl-ocr

sourceHugging Faceupdated 6mo agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference


title: Qwen2-VL-2B-OCR emoji: ๐Ÿ” colorFrom: blue colorTo: indigo sdk: docker pinned: false ---

Qwen2-VL-2B-OCR

OCR API using Qwen2-VL-2B model for text extraction.

API Endpoints

  • โ€”POST /ocr - Base64 image input
  • โ€”POST /upload - File upload
  • โ€”POST /structured - Structured contact extraction
  • โ€”GET /health - Health check

Usage

python
import requests
import base64

with open("image.png", "rb") as f:
    img_base64 = base64.b64encode(f.read()).decode()

response = requests.post(
    "https://YOUR_SPACE.hf.space/ocr",
    json={"image": img_base64}
)

print(response.json()["text"])