shing-dev commited on
Commit
15e29fa
·
1 Parent(s): be47476

updating the max token

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -64,7 +64,7 @@ def truncate_content_to_token_limit(content, max_tokens=1200):
64
  return truncated_content
65
 
66
 
67
- def search_similar_documents(query, max_tokens=700):
68
  """Search for the most similar document and truncate the content to a token limit."""
69
  query_embedding = embedding_model.encode(query).reshape(1, -1)
70
  distances, indices = index.search(query_embedding, 1) # Retrieve the top-1 result
 
64
  return truncated_content
65
 
66
 
67
+ def search_similar_documents(query, max_tokens=1200):
68
  """Search for the most similar document and truncate the content to a token limit."""
69
  query_embedding = embedding_model.encode(query).reshape(1, -1)
70
  distances, indices = index.search(query_embedding, 1) # Retrieve the top-1 result