jonathanjordan21 commited on
Commit
9cc1146
·
verified ·
1 Parent(s): f012e76

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -376,17 +376,19 @@ def respond(
376
  if result != None:
377
  results.append(result)
378
  out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
379
- elif description != None:
380
- print("ENTER DESC")
381
- descriptions.append(description)
382
- result_details.append(result_detail)
383
- out += "\n\n" + build_output_formula(descriptions, result_details)
384
  elif vehicle_tax_info.get(plate):
385
  out += "\n\n" + build_output_vehicle(plate)
386
  else:
387
  # + request_code[6:] + f"\nConfidence score: {round(scores[s_max].tolist(),3)}"
388
  out += "Request code number: " + request_code[:3] + "\nRequest detail: " + "\nPlate numbers: " + plate_numbers
389
 
 
 
 
 
 
 
 
390
  return out
391
 
392
  # if vehicle_tax_info.get(request_detail)
 
376
  if result != None:
377
  results.append(result)
378
  out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
 
 
 
 
 
379
  elif vehicle_tax_info.get(plate):
380
  out += "\n\n" + build_output_vehicle(plate)
381
  else:
382
  # + request_code[6:] + f"\nConfidence score: {round(scores[s_max].tolist(),3)}"
383
  out += "Request code number: " + request_code[:3] + "\nRequest detail: " + "\nPlate numbers: " + plate_numbers
384
 
385
+ if out == "":
386
+ if request_code[:3] == undetected_code:
387
+ return "Request code number: " + request_code[:3] + "\nRequest detail: " + "\nPlate numbers: " + plate_numbers
388
+ else:
389
+ result, description, result_detail = get_calculation(request_code[:3], "")
390
+ out = build_output_formula([description], [result_detail])
391
+
392
  return out
393
 
394
  # if vehicle_tax_info.get(request_detail)