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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -223,10 +223,11 @@ def process_and_output_files(input_files):
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
  }
 
223
  # )
224
 
225
  response_dict = json.loads(chats[1]["value"][0][1])
226
+ if category == "RANDOM":
227
+ category = response_dict.get("summary")
228
  # Extract the relevant data
229
  extracted_data = {
230
+ "Nature of Expenditure": category,
231
  "Bill/Invoice No.": response_dict.get("uids"),
232
  "Amount(Rs.)": response_dict.get("total")
233
  }