Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -117,8 +117,10 @@ print(top_results)
|
|
| 117 |
client = InferenceClient("HuggingFaceH4/zephyr-7b-beta")
|
| 118 |
|
| 119 |
def respond(message, history):
|
| 120 |
-
|
| 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 |
|