Namitg02 commited on
Commit
55957a8
·
verified ·
1 Parent(s): 877598f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -77,7 +77,7 @@ terminators = [
77
 
78
  def search(query: str, k: int = 3 ):
79
  """a function that embeds a new query and returns the most probable results"""
80
- embedded_query = embedding_model.encode(query) # create embedding of a new query
81
  scores, retrieved_examples = data.get_nearest_examples( # retrieve results
82
  "embeddings", embedded_query, # compare our new embedded query with the dataset embeddings
83
  k=k # get only top k results
 
77
 
78
  def search(query: str, k: int = 3 ):
79
  """a function that embeds a new query and returns the most probable results"""
80
+ embedded_query = embedding_model.encode([query]) # create embedding of a new query
81
  scores, retrieved_examples = data.get_nearest_examples( # retrieve results
82
  "embeddings", embedded_query, # compare our new embedded query with the dataset embeddings
83
  k=k # get only top k results