Spaces:
Sleeping
Sleeping
Commit ·
1466979
1
Parent(s): 403f201
update
Browse files
app.py
CHANGED
|
@@ -27,11 +27,14 @@ def extract_data(data: ReceiptRequest):
|
|
| 27 |
{
|
| 28 |
"type": "text",
|
| 29 |
"text": (
|
| 30 |
-
"Extract
|
| 31 |
-
"- Amount paid\n"
|
| 32 |
-
"- Transaction
|
| 33 |
"- Session ID (if available)\n\n"
|
| 34 |
-
"
|
|
|
|
|
|
|
|
|
|
| 35 |
),
|
| 36 |
},
|
| 37 |
{"type": "image_url", "image_url": {"url": data.image_url}},
|
|
|
|
| 27 |
{
|
| 28 |
"type": "text",
|
| 29 |
"text": (
|
| 30 |
+
"Extract the following details from this receipt image:\n"
|
| 31 |
+
"- Amount paid-rmove comma and make it .2f\n"
|
| 32 |
+
"- Transaction ID or Reference Number or any referrence number on the reciept as transaction, then if none available, use the date and time written together in yyyymmddhhmmss as transaction id \n"
|
| 33 |
"- Session ID (if available)\n\n"
|
| 34 |
+
"- sender name\n"
|
| 35 |
+
"- transaction date written together yyyymmddhhmmss \n"
|
| 36 |
+
"Return the result as a JSON object with these keys: "
|
| 37 |
+
"`amount`, `transaction_id`, `session_id`,'sender','transaction date'."
|
| 38 |
),
|
| 39 |
},
|
| 40 |
{"type": "image_url", "image_url": {"url": data.image_url}},
|