Last active
March 4, 2026 07:39
-
-
Save ashhadulislam/c39684476111b6ea104c9d6dd7de06ed to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import json | |
| import base64 | |
| import os | |
| import time | |
| import json | |
| import re | |
| EXPECTED_KEYS = { | |
| "serial_number", | |
| "name", | |
| "father_name", | |
| "house_number", | |
| "age", | |
| "gender", | |
| "id_number", | |
| "under_adjudication", | |
| "file_identifier", | |
| "file_name" | |
| } | |
| openrouter_api_key='...' # your own api key | |
| namecard_info_extractor_prompt=''' | |
| Extract the required fields from the image. | |
| Fields: | |
| - serial_number | |
| - name | |
| - father_name | |
| - house_number | |
| - age | |
| - gender | |
| - id_number | |
| - under_adjudication | |
| If watermark "Under Adjudication" is visible (even faint): | |
| under_adjudication = true | |
| Else: | |
| under_adjudication = false | |
| Return the extracted values. | |
| No markdown. | |
| No explanation. | |
| ''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment