on 2025 Mar 21 2:01 PM
Im currently looking to implement a centralized web api hosted through the aicore btp service which lets me perform OCR on whatever file i want.
The most promising implementation which i could understand (sometimes im running into blog post which i simply dont understand) was to host a simple flask api through aicore which uses the open source pytesseract package / model. Although that would work it doesnt seem like the best practice way of accomplishing the goal since im not actually using aicore itself for anything really. I just use it for hosting purpouse.
So what would be the best way to implement this OCR web api ?
Request clarification before answering.
if you have SAP AI Core License, you can choose better model and Use the deployment URL and authorization token to make API calls to the OCR model.
below is the sample curl command..
curl --location '<deployment_url>/invoke' \ --header 'AI-Resource-Group: <resource_group>' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <auth_token>' \ --data '{ "messages": [ { "role": "user", "content": "<base64_encoded_image>" } ] }'
if the above curl command works fine, then you can implement via
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
12 | |
9 | |
8 | |
8 | |
5 | |
4 | |
4 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.