Spaces:
Runtime error
Runtime error
Update search.py
Browse filesspaced def doc line 71
and within def doc changed the "URL" to "urls"
search.py
CHANGED
@@ -114,13 +114,14 @@ class Document:
|
|
114 |
print("Creating Document...")
|
115 |
chunked_data: list[str] = []
|
116 |
urls: list[str] = []
|
|
|
117 |
for url, dataitem in self.data:
|
118 |
data = self.chunk_page(dataitem)
|
119 |
chunked_data.append(data)
|
120 |
urls.append(url)
|
121 |
|
122 |
chunked_data = [chunk for sublist in chunked_data for chunk in sublist]
|
123 |
-
return chunked_data,
|
124 |
|
125 |
|
126 |
class SemanticSearch:
|
@@ -145,4 +146,4 @@ class SemanticSearch:
|
|
145 |
|
146 |
def get_embeding(self, text: Union[list[str], str]):
|
147 |
en = self.st.encode(text)
|
148 |
-
return en
|
|
|
114 |
print("Creating Document...")
|
115 |
chunked_data: list[str] = []
|
116 |
urls: list[str] = []
|
117 |
+
|
118 |
for url, dataitem in self.data:
|
119 |
data = self.chunk_page(dataitem)
|
120 |
chunked_data.append(data)
|
121 |
urls.append(url)
|
122 |
|
123 |
chunked_data = [chunk for sublist in chunked_data for chunk in sublist]
|
124 |
+
return chunked_data, urls
|
125 |
|
126 |
|
127 |
class SemanticSearch:
|
|
|
146 |
|
147 |
def get_embeding(self, text: Union[list[str], str]):
|
148 |
en = self.st.encode(text)
|
149 |
+
return en
|