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 torch | |
| from PIL import Image | |
| from transformers import AutoProcessor, AutoModelForCausalLM, AutoTokenizer | |
| import requests | |
| sample_text = "FEDERAL REPUBLIC OF NIGERIA\nNational Identity Card\nSURNAME\nEgonu\nFIRST NAME\nNarcisse\nMIDDLE NAME\nCITIZEN\nDATE OF BIRTH\nISSUE DATE\n01 OCT 60 28 AUG 14\nNATIONALITY\nSEX\nHEIGHT\nNGA\nM\n179cm\n7212 2678 4245 2222\nNimc NGA\nEXPIRY\nDOCUMENT No\n08/19\n4812640614\n" | |
| system_prompt_identity_verification = """ | |
| You are an intelligent document parser specifically designed for identity verification from various national identity documents. Your primary task is to meticulously analyze the **current document text provided at the end of this prompt** and extract the specified fields. Ensure your output is a single, valid JSON object. |
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
| openapi: 3.0.0 | |
| info: | |
| title: JigsawStack | |
| version: 1.0.0 | |
| servers: | |
| - url: https://api.jigsawstack.com | |
| paths: | |
| /summary: | |
| post: | |
| tags: |
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
| [ | |
| { | |
| "accent": "af-ZA-female-1", | |
| "locale_name": "Afrikaans (South Africa)", | |
| "gender": "female" | |
| }, | |
| { | |
| "accent": "af-ZA-male-1", | |
| "locale_name": "Afrikaans (South Africa)", | |
| "gender": "male" |
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
| [ | |
| "A", | |
| "NS", | |
| "MD", | |
| "MF", | |
| "CNAME", | |
| "SOA", | |
| "MB", | |
| "MG", | |
| "MR", |
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
| [ | |
| { | |
| "regex": "^[A-Z]{3}\\d{6}$", | |
| "name": "Argentina", | |
| "iso2": "AR", | |
| "iso3": "ARG" | |
| }, | |
| { | |
| "regex": "^\\d{9}$", | |
| "name": "Angola", |
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
| {"ARG":"^[A-Z]{3}\\d{6}$","AGO":"^\\d{9}$","ARM":"^[A-Z]{2}\\d{7}$","NRU":"^[A-Z]{1}\\d{7}$","ITA":"^[A-Z0-9]{2}\\d{7}$","MLI":"^\\d{9}$","AUS":"^[A-Z]\\d{7}$","UGA":"^\\d{8}$","AUT":"^[A-Z]\\d{7}$","AND":"^[A-Z0-9]{6}$","AFG":"^[A-Z]{2}\\d{7}$","ALB":"^[A-Z]{2}\\d{7}$","DZA":"^[A-Z]{2}\\d{6}$","ASM":"^[A-Z]{2}\\d{6}$ ","AZE":"^[A-Z]{2,3}\\d{7,8}$","BHR":"^[A-Z]{1,2}\\d{7}$","BGD":"^[A-Z]{2}\\d{7}$","BLR":"^[A-Z]{2}\\d{7}$","BTN":"^\\d{7}$","BOL":"^[A-Z]{2}\\d{6}[A-Z]$","BWA":"^[A-Z]{2}\\d{7}$","BGR":"^\\d{9}$","BFA":"^[A-Z]{2}\\d{7}$","KHM":"^[A-Z]{1}\\d{7}$","CMR":"^[A-Z]{2}\\d{7}$","CAN":"^[A-Z]{2}\\d{6}$","CPV":"^[A-Z]{2}\\d{6}$","CAF":"^[A-Z]{1}\\d{8}$","TCD":"^[A-Z]{2}\\d{9}$","COL":"^[A-Z]{2}\\d{6}$","COK":"^\\d{6}$","CRI":"^[A-Z]{3}\\d{6}$","HRV":"^\\d{9}$","CUB":"^[A-Z]{2}\\d{6}$","DNK":"^\\d{9}$","DMA":"^[A-Z]{2}\\d{5}$","DOM":"^\\d{6}[A-Z]{1}\\d{2}$","ECU":"^[A-Z]{2}\\d{6}$","EST":"^([A-Z]\\d{7}|[A-Z]{2}\\d{7})$","ETH":"^\\d{8}$","SLV":"^\\d{8}$","FIN":"^[A-Z]{2}\\d{7}$","FRA":"^\\d{2}[A-Z]{2}\\d{5 |
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
| ["Afghanistan","Albania","Algeria","American Samoa","Andorra","Angola","Antigua & Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan", "Brazil", "Belgium","Bahamas","Bahrain","Bangladesh", "Egypt", "Cyprus","Hong Kong S.A.R.","Myanmar","Syria", "South Sudan", "Sudan","Saint Kitts And Nevis", "Monaco","Liberia", "Guinea", "Guinea-Bissau", "Czech Republic", "Belarus","Bhutan","Bolivia","Benin", "Cyprus","Chile","China", "Iran","Turkey","Bosnia and Herzegovina","Botswana","Bulgaria","Burkina Faso","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Colombia","Congo - Brazzaville","Congo - Kinshasa","Cook Islands","Costa Rica","Croatia","Cuba","Czechia","Denmark","Dominica","Dominican Republic","Ecuador","El Salvador","Estonia","Ethiopia","Finland","France","Gabon","Gambia", "Greece","Georgia","Germany","Ghana","Gibratar","Greenland","Guatemala","Guyana","Honduras","Haiti","Hungary","Iceland","India","Indonesia","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Ja |
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
| [ | |
| { | |
| "name": "QVGA", | |
| "width": 320, | |
| "height": 240 | |
| }, | |
| { | |
| "name": "VGA", | |
| "width": 640, | |
| "height": 480 |