Spaces:
Sleeping
Sleeping
Update dummy.py
Browse files
dummy.py
CHANGED
|
@@ -1,54 +1,57 @@
|
|
| 1 |
output_test = """{
|
| 2 |
"status": "success",
|
| 3 |
"message": "Document processed successfully",
|
| 4 |
-
"filename": "Contoh WOD CM
|
| 5 |
-
"wod_type": "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
"results": {
|
| 7 |
-
"prediction": "
|
| 8 |
"summary": {
|
| 9 |
"Merchant Signboard Photo": {
|
| 10 |
-
"reasoning": "The
|
| 11 |
"status": "true"
|
| 12 |
},
|
| 13 |
"EDC Machine Photo": {
|
| 14 |
-
"reasoning": "The EDC machine photo is
|
| 15 |
"status": "true"
|
| 16 |
},
|
| 17 |
"EDC Desk Placement": {
|
| 18 |
-
"reasoning": "The EDC machine
|
| 19 |
"status": "true"
|
| 20 |
},
|
| 21 |
"MID and TID Extraction": {
|
| 22 |
-
"reasoning": "MID and TID are
|
| 23 |
"status": "true"
|
| 24 |
},
|
| 25 |
"Photo Timestamps": {
|
| 26 |
-
"reasoning": "Timestamps are
|
| 27 |
"status": "true"
|
| 28 |
},
|
| 29 |
"Sales Draft Clarity": {
|
| 30 |
-
"reasoning": "
|
| 31 |
"status": "true"
|
| 32 |
},
|
| 33 |
-
"Total Transaction Extraction
|
| 34 |
-
"reasoning": "The transaction
|
| 35 |
-
"status": "
|
| 36 |
-
},
|
| 37 |
-
"Transaction Date Extraction": {
|
| 38 |
-
"reasoning": "The transaction date ('17 Jan 2025 17:37:54') is available on Page 2, but not on other pages due to the absence of a Sales Draft.",
|
| 39 |
-
"status": "true"
|
| 40 |
},
|
| 41 |
-
"
|
| 42 |
-
"reasoning": "The
|
| 43 |
-
"status": "true"
|
| 44 |
-
},
|
| 45 |
-
"Training Form Attachment Requested PM": {
|
| 46 |
-
"reasoning": "The merchant training form is attached on Page 3, but not available or mentioned on other pages, except for Page 6 which mentions the possibility of training but does not confirm its completion or attachment.",
|
| 47 |
"status": "true"
|
| 48 |
},
|
| 49 |
-
"
|
| 50 |
-
"reasoning": "The
|
| 51 |
-
"status": "
|
| 52 |
}
|
| 53 |
}
|
| 54 |
}
|
|
|
|
| 1 |
output_test = """{
|
| 2 |
"status": "success",
|
| 3 |
"message": "Document processed successfully",
|
| 4 |
+
"filename": "Contoh WOD CM VISIT NEGATIVE.pdf",
|
| 5 |
+
"wod_type": "VISIT",
|
| 6 |
+
"extracted_data": {
|
| 7 |
+
"Nama Merchant/Agent": "KANGKUNG BAKAR TEGAL MB",
|
| 8 |
+
"Alamat Merchant/Agent": "KANGKUNG BAKAR RITA SUPERMALL LT UG TEGAL",
|
| 9 |
+
"City": "Tegal (Kota)",
|
| 10 |
+
"SN EDC": "238JKD8M4010",
|
| 11 |
+
"TID MTI": "78434342",
|
| 12 |
+
"MID MTI": "71161778488",
|
| 13 |
+
"SIM CARD": "6210005390622461",
|
| 14 |
+
"SAM CARD": "-",
|
| 15 |
+
"Started On": "13-Jan-2025 08:23"
|
| 16 |
+
},
|
| 17 |
"results": {
|
| 18 |
+
"prediction": "NEGATIVE",
|
| 19 |
"summary": {
|
| 20 |
"Merchant Signboard Photo": {
|
| 21 |
+
"reasoning": "The merchant signboard photo is partially verified with the name 'BAKAR' visible on pages 2 and 5, but the full name 'KANGKUNG BAKAR TEGAL MB' is mentioned in the text below the image on page 5.",
|
| 22 |
"status": "true"
|
| 23 |
},
|
| 24 |
"EDC Machine Photo": {
|
| 25 |
+
"reasoning": "The EDC machine photo is verified on pages 2 and 7, with the EDC machine screen and internal components visible, but the Serial Number (SN) is not clearly visible.",
|
| 26 |
"status": "true"
|
| 27 |
},
|
| 28 |
"EDC Desk Placement": {
|
| 29 |
+
"reasoning": "The EDC machine's placement on the counter/cashier's desk is only verified on page 2.",
|
| 30 |
"status": "true"
|
| 31 |
},
|
| 32 |
"MID and TID Extraction": {
|
| 33 |
+
"reasoning": "MID and TID are extracted successfully from sales drafts on multiple pages (2, 3, 4, 5, 6) with varying values, including TID: '17694788', '17487603' and MID: '71667788', '00000217104875', '71161778488'.",
|
| 34 |
"status": "true"
|
| 35 |
},
|
| 36 |
"Photo Timestamps": {
|
| 37 |
+
"reasoning": "Timestamps are present on photos across multiple pages (2, 3, 4, 5, 6), with dates ranging from '2021 01 13 20:06:40' to '2025 01 13 20:03'.",
|
| 38 |
"status": "true"
|
| 39 |
},
|
| 40 |
"Sales Draft Clarity": {
|
| 41 |
+
"reasoning": "Sales drafts are clear and legible on pages 2, 3, 4, 5, and 6.",
|
| 42 |
"status": "true"
|
| 43 |
},
|
| 44 |
+
"Total Transaction Extraction Rp12": {
|
| 45 |
+
"reasoning": "The total transaction value of 'Rp12' is not found on any of the sales drafts or receipts.",
|
| 46 |
+
"status": "false"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
},
|
| 48 |
+
"Total Transaction Extraction Rp13": {
|
| 49 |
+
"reasoning": "The total transaction value of 'Rp13' is successfully extracted from sales drafts on pages 2, 3, 4, 5, and 6.",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 50 |
"status": "true"
|
| 51 |
},
|
| 52 |
+
"Training Form Attachment": {
|
| 53 |
+
"reasoning": "The merchant training form is not attached or visible in the provided documents across all pages.",
|
| 54 |
+
"status": "false"
|
| 55 |
}
|
| 56 |
}
|
| 57 |
}
|