Seth0330 commited on
Commit
5959a3c
·
verified ·
1 Parent(s): 33d39b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 "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.
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.