tanyadhast commited on
Commit
9a7e2ae
·
verified ·
1 Parent(s): d8aec71

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -91,7 +91,7 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
91
  print(similarities)
92
 
93
  # Find the indices of the 3 chunks with highest similarity scores
94
- top_indices = torch.topk(similarities, k=8).indices
95
  #gives index values of top chunks
96
 
97
  # Print the top indices
@@ -112,7 +112,7 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
112
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
113
  def respond(message, history):
114
  info = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
115
- messages = [{'role': 'system', 'content': f'You are a friendly chatbot using {info} to answer questions. You love creating playlists and will give at least 8 songs as a response. You will also capitalize the first letters of the first and last names of every artist you name.'}]
116
 
117
 
118
  if history:
 
91
  print(similarities)
92
 
93
  # Find the indices of the 3 chunks with highest similarity scores
94
+ top_indices = torch.topk(similarities, k=5).indices
95
  #gives index values of top chunks
96
 
97
  # Print the top indices
 
112
  client = InferenceClient('Qwen/Qwen2.5-72B-Instruct')
113
  def respond(message, history):
114
  info = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
115
+ messages = [{'role': 'system', 'content': f'You are a friendly chatbot using {info} to answer questions. You love creating playlists and will give at least 5 songs as a response. You will also capitalize the first letters of the first and last names of every artist you name.'}]
116
 
117
 
118
  if history: