sussahoo commited on
Commit
09cab40
·
1 Parent(s): 7282b92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -424,7 +424,9 @@ def process_image(image):
424
  csv_path = "/content/sample_data/table_" + str(idx)
425
  df = create_dataframe(sequential_cell_img_list, max_cols, max_rows, csv_path)
426
  result.append(df)
427
- res = result[0].to_json(orient='records')
 
 
428
  return res
429
 
430
 
 
424
  csv_path = "/content/sample_data/table_" + str(idx)
425
  df = create_dataframe(sequential_cell_img_list, max_cols, max_rows, csv_path)
426
  result.append(df)
427
+ res = result[0].rename(columns={'Item': 'name', 'Total Cost': 'amount'})[["name", "amount"]]
428
+ res["cost Code"] = ""
429
+ res = {"items": res.to_json(orient='records')}
430
  return res
431
 
432