Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -223,8 +223,8 @@ async def websocket_endpoint(websocket: WebSocket):
|
|
223 |
if (index+1) in citation_numbers:
|
224 |
sources[f"[{index+1}]"] = doc.metadata["source"]
|
225 |
else:
|
226 |
-
if
|
227 |
-
backup[
|
228 |
i += 1
|
229 |
if sources:
|
230 |
await websocket.send_json({'sources': sources})
|
|
|
223 |
if (index+1) in citation_numbers:
|
224 |
sources[f"[{index+1}]"] = doc.metadata["source"]
|
225 |
else:
|
226 |
+
if doc.metadata["source"] not in backup.values():
|
227 |
+
backup[f"[{i}]"] = doc.metadata["source"]
|
228 |
i += 1
|
229 |
if sources:
|
230 |
await websocket.send_json({'sources': sources})
|