Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -53,8 +53,9 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 53 |
client = InferenceClient("microsoft/phi-4")
|
| 54 |
|
| 55 |
def respond(message, history):
|
| 56 |
-
|
| 57 |
-
|
|
|
|
| 58 |
|
| 59 |
if history:
|
| 60 |
messages.extend(history)
|
|
|
|
| 53 |
client = InferenceClient("microsoft/phi-4")
|
| 54 |
|
| 55 |
def respond(message, history):
|
| 56 |
+
|
| 57 |
+
info = get_top_chunks(message, chunk_emeddings, text_chunks)
|
| 58 |
+
messages = [{"role": "system", "content": f"You are a friendly chatbot using {info} to answer questions."}]
|
| 59 |
|
| 60 |
if history:
|
| 61 |
messages.extend(history)
|