Spaces:
Sleeping
Sleeping
Commit ·
8f9cb9f
1
Parent(s): 9148198
debug
Browse files
app.py
CHANGED
|
@@ -118,6 +118,7 @@ def answer(question: str, user_id="demo", history="None"):
|
|
| 118 |
idxs = torch.topk(sims, k=k).indices.tolist()
|
| 119 |
context = "\n".join(store["texts"][i] for i in idxs)
|
| 120 |
elif history == "All":
|
|
|
|
| 121 |
context = "\n".join(store["texts"])
|
| 122 |
|
| 123 |
# 2. Build a Qwen-chat prompt (helper defined earlier)
|
|
|
|
| 118 |
idxs = torch.topk(sims, k=k).indices.tolist()
|
| 119 |
context = "\n".join(store["texts"][i] for i in idxs)
|
| 120 |
elif history == "All":
|
| 121 |
+
store = kb[user_id]
|
| 122 |
context = "\n".join(store["texts"])
|
| 123 |
|
| 124 |
# 2. Build a Qwen-chat prompt (helper defined earlier)
|