Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -113,11 +113,11 @@ def fallback_supplier(text):
|
|
| 113 |
|
| 114 |
def get_extraction_prompt(model_choice, txt):
|
| 115 |
return (
|
| 116 |
-
You are an expert invoice parser.
|
| 117 |
-
Extract data according to the visible table structure and column headers in the invoice.
|
| 118 |
-
For every line item, only extract fields that correspond to the table columns for that row (do not include header/shipment fields in line items).
|
| 119 |
-
Merge all multi-line content within a single cell into that field (especially for the
|
| 120 |
-
Shipment/invoice-level fields such as CAR NUMBER, SHIPPING POINT, SHIPMENT NUMBER, CURRENCY, etc., must go ONLY into the
|
| 121 |
|
| 122 |
**For example, if the source document shows Payment Terms: 1% 10 ADI, ADF, NET 20 DAYS
|
| 123 |
**Do not alter the sequence, combine, or separate phrases in any way.
|
|
|
|
| 113 |
|
| 114 |
def get_extraction_prompt(model_choice, txt):
|
| 115 |
return (
|
| 116 |
+
"You are an expert invoice parser. "
|
| 117 |
+
"Extract data according to the visible table structure and column headers in the invoice. "
|
| 118 |
+
"For every line item, only extract fields that correspond to the table columns for that row (do not include header/shipment fields in line items). "
|
| 119 |
+
"Merge all multi-line content within a single cell into that field (especially for the 'description' and 'notes'). "
|
| 120 |
+
"Shipment/invoice-level fields such as CAR NUMBER, SHIPPING POINT, SHIPMENT NUMBER, CURRENCY, etc., must go ONLY into the 'invoice_header', not as line item fields.\n"
|
| 121 |
|
| 122 |
**For example, if the source document shows Payment Terms: 1% 10 ADI, ADF, NET 20 DAYS
|
| 123 |
**Do not alter the sequence, combine, or separate phrases in any way.
|