File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ def forward(
288288 page_content = doc [self .text_column_name ],
289289 metadata = {
290290 "doc_id" : self ._extract_doc_ids (doc ),
291- "doc_uri" : doc [self .docs_uri_column_name ],
291+ "doc_uri" : doc [self .docs_uri_column_name ] if self . docs_uri_column_name else None ,
292292 }
293293 | self ._get_extra_columns (doc ),
294294 type = "Document" ,
@@ -300,7 +300,7 @@ def forward(
300300 return Prediction (
301301 docs = [doc [self .text_column_name ] for doc in sorted_docs ],
302302 doc_ids = [self ._extract_doc_ids (doc ) for doc in sorted_docs ],
303- doc_uris = [doc [self .docs_uri_column_name ] for doc in sorted_docs ],
303+ doc_uris = [doc [self .docs_uri_column_name ] for doc in sorted_docs ] if self . docs_uri_column_name else None ,
304304 extra_columns = [self ._get_extra_columns (item ) for item in sorted_docs ],
305305 )
306306
You can’t perform that action at this time.
0 commit comments