Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
"
|
230 |
-
"
|
231 |
-
"
|
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
|