Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -83,8 +83,10 @@ def process_receipt(model, image):
|
|
| 83 |
def generate_report():
|
| 84 |
prompt = """You are the TrueSpend AI analyst, analyze this transaction data
|
| 85 |
and write an insightful business report on the spending habits of the users """
|
|
|
|
| 86 |
try:
|
| 87 |
# Get the transaction data from the request body
|
|
|
|
| 88 |
transaction_data = request.get_json()
|
| 89 |
transaction_json_string = json.dumps(transaction_data['transactions'])
|
| 90 |
|
|
|
|
| 83 |
def generate_report():
|
| 84 |
prompt = """You are the TrueSpend AI analyst, analyze this transaction data
|
| 85 |
and write an insightful business report on the spending habits of the users """
|
| 86 |
+
model = configure_gemini()
|
| 87 |
try:
|
| 88 |
# Get the transaction data from the request body
|
| 89 |
+
|
| 90 |
transaction_data = request.get_json()
|
| 91 |
transaction_json_string = json.dumps(transaction_data['transactions'])
|
| 92 |
|