sibthinon commited on
Commit
1a14f7c
·
verified ·
1 Parent(s): 60aa4c1

change to e5

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -29,8 +29,8 @@ api = Api(AIRTABLE_API_KEY)
29
  table = api.table(BASE_ID, TABLE_NAME)
30
 
31
  # Load model
32
- model = SentenceTransformer('BAAI/bge-m3')
33
- collection_name = "product_bge-m3"
34
 
35
  # Load whitelist
36
  with open("keyword_whitelist.pkl", "rb") as f:
@@ -110,7 +110,7 @@ def search_product(query):
110
 
111
  result_summary, found = "", False
112
  for res in result:
113
- if res.score > 0.5:
114
  found = True
115
  name = res.payload.get("name", "ไม่ทราบชื่อสินค้า")
116
  score = f"{res.score:.4f}"
 
29
  table = api.table(BASE_ID, TABLE_NAME)
30
 
31
  # Load model
32
+ model = SentenceTransformer('e5_finetuned')
33
+ collection_name = "product_E5_finetune"
34
 
35
  # Load whitelist
36
  with open("keyword_whitelist.pkl", "rb") as f:
 
110
 
111
  result_summary, found = "", False
112
  for res in result:
113
+ if res.score > 0.8:
114
  found = True
115
  name = res.payload.get("name", "ไม่ทราบชื่อสินค้า")
116
  score = f"{res.score:.4f}"