Update main.py
Browse files
main.py
CHANGED
|
@@ -243,7 +243,7 @@ def process_pdf_pages(pdf_file):
|
|
| 243 |
if isinstance(txns, list):
|
| 244 |
all_txns.extend(txns)
|
| 245 |
|
| 246 |
-
return all_txns,
|
| 247 |
|
| 248 |
# --------- Chat Endpoint ---------
|
| 249 |
@app.route("/chat", methods=["POST"])
|
|
@@ -312,7 +312,7 @@ def upload_statements():
|
|
| 312 |
fs.collection("transactions").add(record)
|
| 313 |
stored_count += 1
|
| 314 |
|
| 315 |
-
return jsonify({"message": f"Stored {stored_count} transactions", "file": str(
|
| 316 |
|
| 317 |
# --------- Endpoint: Retrieve or Generate Financial Statement ---------
|
| 318 |
|
|
|
|
| 243 |
if isinstance(txns, list):
|
| 244 |
all_txns.extend(txns)
|
| 245 |
|
| 246 |
+
return all_txns, raw
|
| 247 |
|
| 248 |
# --------- Chat Endpoint ---------
|
| 249 |
@app.route("/chat", methods=["POST"])
|
|
|
|
| 312 |
fs.collection("transactions").add(record)
|
| 313 |
stored_count += 1
|
| 314 |
|
| 315 |
+
return jsonify({"message": f"Stored {stored_count} transactions", "file": str(raw)}), 200
|
| 316 |
|
| 317 |
# --------- Endpoint: Retrieve or Generate Financial Statement ---------
|
| 318 |
|