Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -24,6 +24,7 @@ def merge_json_with_amount(model_output, amount):
|
|
| 24 |
data = json.loads(model_output) # Try parsing the model output
|
| 25 |
except json.JSONDecodeError:
|
| 26 |
return model_output # Return raw model output if it's not valid JSON
|
|
|
|
| 27 |
|
| 28 |
# if amount:
|
| 29 |
# try:
|
|
|
|
| 24 |
data = json.loads(model_output) # Try parsing the model output
|
| 25 |
except json.JSONDecodeError:
|
| 26 |
return model_output # Return raw model output if it's not valid JSON
|
| 27 |
+
data["amount"] = amount
|
| 28 |
|
| 29 |
# if amount:
|
| 30 |
# try:
|