qq1023 commited on
Commit
060e773
·
1 Parent(s): dd357d8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -223,12 +223,12 @@ def process_and_output_files(input_files):
223
  # )
224
 
225
  response_dict = json.loads(chats[1]["value"][0][1])
226
-
227
  # Extract the relevant data
228
  extracted_data = {
229
- "Category": category,
230
- "UIDs": response_dict.get("uids"),
231
- "Total": response_dict.get("total")
232
  }
233
 
234
  # Append the relevant data for this file to the data list
 
223
  # )
224
 
225
  response_dict = json.loads(chats[1]["value"][0][1])
226
+ extracted_category = category if category != "RANDOM" else response_dict.get("summary", "Product")
227
  # Extract the relevant data
228
  extracted_data = {
229
+ "Nature of Expenditure": extracted_category,
230
+ "Bill/Invoice No.": response_dict.get("uids"),
231
+ "Amount(Rs.)": response_dict.get("total")
232
  }
233
 
234
  # Append the relevant data for this file to the data list