Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -124,8 +124,10 @@ client= InferenceClient("Qwen/Qwen2.5-7B-Instruct-1M")
|
|
| 124 |
|
| 125 |
#defining role of AI and user
|
| 126 |
def respond(message,history):
|
|
|
|
| 127 |
|
| 128 |
-
|
|
|
|
| 129 |
|
| 130 |
if history:
|
| 131 |
messages.extend(history) #keep adding history
|
|
|
|
| 124 |
|
| 125 |
#defining role of AI and user
|
| 126 |
def respond(message,history):
|
| 127 |
+
information = get_top_chunks(message, cleaned_chunks, top_chunks)
|
| 128 |
|
| 129 |
+
|
| 130 |
+
messages = [{"role": "assistant", "content": f"You are a friendly chatbot that gives advice to disadvantaged students about their education based on their question. When you give advice, keep in mind the following infromation {information}"}]
|
| 131 |
|
| 132 |
if history:
|
| 133 |
messages.extend(history) #keep adding history
|