midrees2806 commited on
Commit
462de64
·
verified ·
1 Parent(s): 872e183

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +2 -2
utils.py CHANGED
@@ -28,8 +28,8 @@ with open("ds.json") as f:
28
  dataset = json.load(f)
29
 
30
  # ✅ Precompute embeddings for dataset questions
31
- dataset_inputs = [item.get("input", "").lower().strip() for item in dataset]
32
- dataset_answers = [item.get("response", "") for item in dataset]
33
  dataset_embeddings = similarity_model.encode(dataset_inputs, convert_to_tensor=True)
34
 
35
  # ✅ Function to detect greetings
 
28
  dataset = json.load(f)
29
 
30
  # ✅ Precompute embeddings for dataset questions
31
+ dataset_inputs = [item.get("Question", "").lower().strip() for item in dataset]
32
+ dataset_answers = [item.get("Answer", "") for item in dataset]
33
  dataset_embeddings = similarity_model.encode(dataset_inputs, convert_to_tensor=True)
34
 
35
  # ✅ Function to detect greetings