Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -100,14 +100,15 @@ def get_top_chunks(query, chunk_embeddings, text_chunks):
|
|
| 100 |
# Return the list of most relevant chunks
|
| 101 |
return top_chunks
|
| 102 |
|
| 103 |
-
|
| 104 |
-
print(best_physics_chunks)
|
| 105 |
|
| 106 |
|
| 107 |
def respond(message, history):
|
|
|
|
|
|
|
| 108 |
messages = [
|
| 109 |
{"role":"system",
|
| 110 |
-
"content": "You are a very smart, arrogant professor who knows a lot about physics and thinks the user is dumb. You answer their physics question"
|
| 111 |
}
|
| 112 |
]
|
| 113 |
|
|
|
|
| 100 |
# Return the list of most relevant chunks
|
| 101 |
return top_chunks
|
| 102 |
|
| 103 |
+
|
|
|
|
| 104 |
|
| 105 |
|
| 106 |
def respond(message, history):
|
| 107 |
+
best_physics_chunks = get_top_chunks(message, chunk_embeddings, cleaned_chunks)
|
| 108 |
+
print(best_physics_chunks)
|
| 109 |
messages = [
|
| 110 |
{"role":"system",
|
| 111 |
+
"content": "You are a very smart, arrogant professor who knows a lot about physics and thinks the user is dumb. You answer their physics question based on" + best_physics_chunks + "."
|
| 112 |
}
|
| 113 |
]
|
| 114 |
|