Saachi-S123 commited on
Commit
0198ffe
·
verified ·
1 Parent(s): dd8efc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -117,8 +117,10 @@ print(top_results)
117
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
118
 
119
  def respond(message, history):
120
- messages = [{"role": "system", "content": "You are a friendly chatbot"}]
121
-
 
 
122
  if history:
123
  messages.extend(history)
124
 
 
117
  client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
118
 
119
  def respond(message, history):
120
+ top_results = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
121
+ top_results = "/n".join(top_results)
122
+ messages = [{"role": "system", "content": f"You are a friendly chatbot. Base your response on the provided context: {top_results}"]
123
+ print(messages)
124
  if history:
125
  messages.extend(history)
126