shubhjo commited on
Commit
a8f0ca8
·
verified ·
1 Parent(s): cf75375

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +59 -17
app.py CHANGED
@@ -115,23 +115,65 @@ async def process_with_gemini(filename: str, raw_text: str):
115
 
116
  Output JSON:
117
  {{
118
- "currency": "",
119
- "Discount_Percentage": "",
120
- "Due_Date": "",
121
- "Email_Client": "",
122
- "Name_Client": "",
123
- "Products": [],
124
- "Remise": "",
125
- "Subtotal": "",
126
- "Tax": "",
127
- "Tax_Percentage": "",
128
- "Tel_Client": "",
129
- "billing address": "",
130
- "header": "",
131
- "invoice date": "",
132
- "invoice number": "",
133
- "shipping address": "",
134
- "total": ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
135
  }}
136
  """
137
  response = model.generate_content(prompt)
 
115
 
116
  Output JSON:
117
  {{
118
+ "invoice": {{
119
+ "invoice_number": "",
120
+ "invoice_date": "",
121
+ "due_date": "",
122
+ "purchase_order_number": "",
123
+ "vendor": {{
124
+ "vendor_id": "",
125
+ "name": "",
126
+ "address": {{
127
+ "line1": "",
128
+ "line2": "",
129
+ "city": "",
130
+ "state": "",
131
+ "postal_code": "",
132
+ "country": ""
133
+ }},
134
+ "contact": {{
135
+ "email": "",
136
+ "phone": ""
137
+ }},
138
+ "tax_id": ""
139
+ }},
140
+ "buyer": {{
141
+ "buyer_id": "",
142
+ "name": "",
143
+ "address": {{
144
+ "line1": "",
145
+ "line2": "",
146
+ "city": "",
147
+ "state": "",
148
+ "postal_code": "",
149
+ "country": ""
150
+ }},
151
+ "contact": {{
152
+ "email": "",
153
+ "phone": ""
154
+ }},
155
+ "tax_id": ""
156
+ }},
157
+ "items": [
158
+ {{
159
+ "item_id": "",
160
+ "description": "",
161
+ "quantity": 0,
162
+ "unit_of_measure": "",
163
+ "unit_price": 0,
164
+ "total_price": 0,
165
+ "tax_rate": 0,
166
+ "tax_amount": 0,
167
+ "discount": 0,
168
+ "net_amount": 0
169
+ }}
170
+ ],
171
+ "sub_total": 0,
172
+ "tax_total": 0,
173
+ "discount_total": 0,
174
+ "total_amount": 0,
175
+ "currency": ""
176
+
177
  }}
178
  """
179
  response = model.generate_content(prompt)