GLM-OCR
हमारे Serverless Hosted API के माध्यम से image OCR के लिए GLM-OCR का उपयोग करें
कोड नमूना
2
मॉडल चलाएँ
curl --location 'https://serverless.roboflow.com/infer/lmm' \
--header 'Content-Type: application/json' \
--data '{
\"api_key\": \"'\"$ROBOFLOW_API_KEY\"'\",
"image": {"type": "url", "value": "https://media.roboflow.com/inference/license_plate_1.jpg"},
"model_id": "glm-ocr",
"prompt": "OCR",
"max_new_tokens": 128
}'3
मॉडल चलाएँ
import os
import cv2
import numpy as np
import requests
from inference_sdk import InferenceHTTPClient
content = requests.get("https://media.roboflow.com/inference/license_plate_1.jpg").content
image = cv2.imdecode(np.frombuffer(content, np.uint8), cv2.IMREAD_COLOR)
client = InferenceHTTPClient(
api_url="https://serverless.roboflow.com",
api_key=os.environ["ROBOFLOW_API_KEY"],
)
result = client.infer_lmm(
image,
model_id="glm-ocr",
prompt="OCR",
max_new_tokens=128,
)
print(result["response"])280 SE
AUTOMATIC
34 T 6511
Inference speed
उपनाम
विलंबता, 128 tokens (ms)
टोकन/सेकंड
अंतिम अपडेट
क्या यह उपयोगी था?