Spaces:
Sleeping
Sleeping
jonathanjordan21
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -206,7 +206,7 @@ def get_calculation(request_code, plate_number):
|
|
206 |
result_detail = request_code + " - " + calc.get("name")
|
207 |
return result, str(description), result_detail
|
208 |
|
209 |
-
elif
|
210 |
formula = calc.get("formula")
|
211 |
description = inspect.getsource(formula).split(":", 2)[-1].strip()
|
212 |
result_detail = request_code + " - " + calc.get("name")
|
@@ -333,14 +333,14 @@ def respond(
|
|
333 |
|
334 |
if result != None:
|
335 |
results.append(result)
|
|
|
336 |
descriptions.append(description)
|
337 |
result_details.append(result_detail)
|
338 |
-
else:
|
339 |
-
break
|
340 |
|
341 |
if results:
|
342 |
out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
|
343 |
elif descriptions:
|
|
|
344 |
out += "\n\n" + build_output_formula(descriptions, result_details)
|
345 |
elif vehicle_tax_info.get(plate):
|
346 |
out += "\n\n" + build_output_vehicle(plate)
|
@@ -375,6 +375,7 @@ def respond(
|
|
375 |
results.append(result)
|
376 |
out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
|
377 |
elif description != None:
|
|
|
378 |
descriptions.append(description)
|
379 |
result_details.append(result_detail)
|
380 |
out += "\n\n" + build_output_formula(descriptions, result_details)
|
|
|
206 |
result_detail = request_code + " - " + calc.get("name")
|
207 |
return result, str(description), result_detail
|
208 |
|
209 |
+
elif calc != None:
|
210 |
formula = calc.get("formula")
|
211 |
description = inspect.getsource(formula).split(":", 2)[-1].strip()
|
212 |
result_detail = request_code + " - " + calc.get("name")
|
|
|
333 |
|
334 |
if result != None:
|
335 |
results.append(result)
|
336 |
+
if descriptions != None:
|
337 |
descriptions.append(description)
|
338 |
result_details.append(result_detail)
|
|
|
|
|
339 |
|
340 |
if results:
|
341 |
out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
|
342 |
elif descriptions:
|
343 |
+
prnt("ENTER DESC")
|
344 |
out += "\n\n" + build_output_formula(descriptions, result_details)
|
345 |
elif vehicle_tax_info.get(plate):
|
346 |
out += "\n\n" + build_output_vehicle(plate)
|
|
|
375 |
results.append(result)
|
376 |
out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
|
377 |
elif description != None:
|
378 |
+
print("ENTER DESC")
|
379 |
descriptions.append(description)
|
380 |
result_details.append(result_detail)
|
381 |
out += "\n\n" + build_output_formula(descriptions, result_details)
|