jonathanjordan21 commited on
Commit
625565d
·
verified ·
1 Parent(s): d28b247

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -12
app.py CHANGED
@@ -87,15 +87,15 @@ codes = """001 - Pendaftaran Kendaraan
87
  008 - Pelaporan dan Bantuan Terkait Kendaraan
88
  009 - Penangguhan atau Deklarasi Perubahan Penggunaan Kendaraan""".split("\n")
89
 
90
- documents = """Vehicle Registration
91
- Vehicle Data Update
92
- Vehicle Ownership or Change of Name
93
- Reporting of Lost Documents or Plates
94
- Vehicle Tax Payment and Management
95
- Vehicle Inspection and Verification
96
- Registration of Export, Import, or Fleet Vehicles
97
- Reporting and Assistence of Vehicles Insurance
98
- Suspension or Declaration of Change of Vehicle Use""".split("\n")
99
 
100
 
101
  # examples = [
@@ -327,7 +327,7 @@ detail_perhitungan = {
327
  # Example formula: 5% of harga_jual
328
  },
329
  "003": {
330
- "name": "Alih Kepemilikan Kendaraan",
331
  "formula": lambda harga_jual: harga_jual * 0.1,
332
  # Example formula: 10% of harga_jual
333
  },
@@ -531,8 +531,8 @@ def respond(
531
 
532
  if model.config._name_or_path in model_ids[-2:]:
533
  # documents = [v["name"] for v in detail_perhitungan.values()]
534
- # sentence_pairs = [[message, v["name"]] for v in detail_perhitungan.values()]
535
- sentence_pairs = [[message, doc] for doc in documents]
536
  scores = model.predict(sentence_pairs, convert_to_tensor=True)
537
  weights = [1,1,1,1,1,1,1,1,1]
538
  # scores = [x["score"] for x in model.rank(message, documents)]
 
87
  008 - Pelaporan dan Bantuan Terkait Kendaraan
88
  009 - Penangguhan atau Deklarasi Perubahan Penggunaan Kendaraan""".split("\n")
89
 
90
+ # documents = """Vehicle Registration
91
+ # Vehicle Data Update
92
+ # Vehicle Ownership or Change of Name
93
+ # Reporting of Lost Documents or Plates
94
+ # Vehicle Tax Payment and Management
95
+ # Vehicle Inspection and Verification
96
+ # Registration of Export, Import, or Fleet Vehicles
97
+ # Reporting and Assistence of Vehicles Insurance
98
+ # Suspension or Declaration of Change of Vehicle Use""".split("\n")
99
 
100
 
101
  # examples = [
 
327
  # Example formula: 5% of harga_jual
328
  },
329
  "003": {
330
+ "name": "Alih Kepemilikan (Balik Nama) Kendaraan",
331
  "formula": lambda harga_jual: harga_jual * 0.1,
332
  # Example formula: 10% of harga_jual
333
  },
 
531
 
532
  if model.config._name_or_path in model_ids[-2:]:
533
  # documents = [v["name"] for v in detail_perhitungan.values()]
534
+ sentence_pairs = [[message, v["name"]] for v in detail_perhitungan.values()]
535
+ # sentence_pairs = [[message, doc] for doc in documents]
536
  scores = model.predict(sentence_pairs, convert_to_tensor=True)
537
  weights = [1,1,1,1,1,1,1,1,1]
538
  # scores = [x["score"] for x in model.rank(message, documents)]