jonathanjordan21 commited on
Commit
5960330
·
verified ·
1 Parent(s): 8411210

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -225,7 +225,8 @@ def build_output_formula(descriptions, result_details):
225
  return out
226
 
227
 
228
- def build_output_vehicle(vehicle):
 
229
  out = "----------------------------------------------------\n\n"
230
  out = "Nomor Polisi: " + plate_number + "\n"
231
  out += "\n".join([k + " : " + str(v) if k != "no_rangka" else k + " : " + censor_middle(v) for k,v in vehicle.items()])
@@ -340,7 +341,7 @@ def respond(
340
  elif descriptions:
341
  out += "\n\n" + build_output_formula(descriptions, result_details)
342
  elif vehicle_tax_info.get(plate):
343
- out += "\n\n" + build_output_vehicle(vehicle_tax_info.get(plate))
344
  else:
345
  # + request_details + f"\n\nConfidence score:\n{request_scores}"
346
  out += "Request code number:\n" + request_numbers + "\n\nRequest detail:\n" + "\n\nPlate numbers: " + plate_numbers
 
225
  return out
226
 
227
 
228
+ def build_output_vehicle(plate_number):
229
+ vehicle = vehicle_tax_info.get(plate_number)
230
  out = "----------------------------------------------------\n\n"
231
  out = "Nomor Polisi: " + plate_number + "\n"
232
  out += "\n".join([k + " : " + str(v) if k != "no_rangka" else k + " : " + censor_middle(v) for k,v in vehicle.items()])
 
341
  elif descriptions:
342
  out += "\n\n" + build_output_formula(descriptions, result_details)
343
  elif vehicle_tax_info.get(plate):
344
+ out += "\n\n" + build_output_vehicle(plate)
345
  else:
346
  # + request_details + f"\n\nConfidence score:\n{request_scores}"
347
  out += "Request code number:\n" + request_numbers + "\n\nRequest detail:\n" + "\n\nPlate numbers: " + plate_numbers