Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -87,6 +87,16 @@ codes = """001 - Pendaftaran Kendaraan
|
|
| 87 |
008 - Pelaporan dan Bantuan Terkait Kendaraan
|
| 88 |
009 - Penangguhan atau Deklarasi Perubahan Penggunaan Kendaraan""".split("\n")
|
| 89 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
|
| 91 |
# examples = [
|
| 92 |
# {"code": "001", "examples": [
|
|
@@ -521,7 +531,8 @@ def respond(
|
|
| 521 |
|
| 522 |
if model.config._name_or_path in model_ids[-2:]:
|
| 523 |
# documents = [v["name"] for v in detail_perhitungan.values()]
|
| 524 |
-
sentence_pairs = [[message, v["name"]] for v in detail_perhitungan.values()]
|
|
|
|
| 525 |
scores = model.predict(sentence_pairs, convert_to_tensor=True)
|
| 526 |
weights = [1,1,1,1,1,1,1,1,1]
|
| 527 |
# 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 = [
|
| 102 |
# {"code": "001", "examples": [
|
|
|
|
| 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_paris = [[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)]
|