Spaces:
Runtime error
Runtime error
Update rag.py
Browse files- app/rag.py +6 -6
app/rag.py
CHANGED
@@ -107,9 +107,9 @@ class ChatPDF:
|
|
107 |
return streaming_response
|
108 |
|
109 |
def clear(self):
|
110 |
-
|
111 |
-
self.vector_store.
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
|
|
107 |
return streaming_response
|
108 |
|
109 |
def clear(self):
|
110 |
+
if self.nodes:
|
111 |
+
self.vector_store.delete_nodes(self.nodes)
|
112 |
+
self.pdf_count = 0
|
113 |
+
self.text_chunks = []
|
114 |
+
self.doc_ids = []
|
115 |
+
self.nodes = []
|