jonathanjordan21 commited on
Commit
9dc3ccd
·
verified ·
1 Parent(s): 65539f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -173,6 +173,7 @@ codes_emb = model.encode([x[6:] for x in codes])
173
 
174
 
175
  def get_calculation(request_code, plate_number):
 
176
  calc = detail_perhitungan.get(request_code)
177
  vehicle = vehicle_tax_info.get(plate_number)
178
 
@@ -189,7 +190,7 @@ def get_calculation(request_code, plate_number):
189
  # out += "\nWajib Pajak ingin melakukan proses berikut:\n"
190
  # out = ""
191
 
192
- return result, description, result_detail
193
 
194
 
195
  def build_output(result, description, result_detail, plate_number):
@@ -275,8 +276,11 @@ def respond(
275
  results.append(result)
276
  descriptions.append(description)
277
  result_details.append(result_detail)
 
 
278
 
279
- out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
 
280
 
281
  return out
282
 
 
173
 
174
 
175
  def get_calculation(request_code, plate_number):
176
+ print(request_code, plate_number, "GET CALC")
177
  calc = detail_perhitungan.get(request_code)
178
  vehicle = vehicle_tax_info.get(plate_number)
179
 
 
190
  # out += "\nWajib Pajak ingin melakukan proses berikut:\n"
191
  # out = ""
192
 
193
+ return result, str(description), result_detail
194
 
195
 
196
  def build_output(result, description, result_detail, plate_number):
 
276
  results.append(result)
277
  descriptions.append(description)
278
  result_details.append(result_detail)
279
+ else:
280
+ break
281
 
282
+ if results:
283
+ out += "\n\n" + build_outputs(results, descriptions, result_details, plate)
284
 
285
  return out
286