camphong24032002 commited on
Commit
30ee30c
·
1 Parent(s): 04ee0f7
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -65,6 +65,8 @@ def chat():
65
  def get_chat_response(text):
66
  query_vector = model.encode(text_preprocessing(text)).astype(float)
67
  results = util.pytorch_cos_sim(query_vector, docs)
 
68
  top_n = 3
69
  sort_idx = results.argsort(descending=True, axis=1)[0][:top_n]
 
70
  return df.iloc[sort_idx]
 
65
  def get_chat_response(text):
66
  query_vector = model.encode(text_preprocessing(text)).astype(float)
67
  results = util.pytorch_cos_sim(query_vector, docs)
68
+ print(results.shape)
69
  top_n = 3
70
  sort_idx = results.argsort(descending=True, axis=1)[0][:top_n]
71
+ print(sort_idx)
72
  return df.iloc[sort_idx]