mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-05-08 16:28:06 +00:00
Merge 9dfab80598
into b7ee43788d
This commit is contained in:
commit
f17c8e69ca
private_gpt
@ -73,13 +73,13 @@ class IngestionHelper:
|
||||
) -> list[Document]:
|
||||
documents = IngestionHelper._load_file_to_documents(file_name, file_data)
|
||||
for document in documents:
|
||||
document.metadata["file_name"] = file_name
|
||||
document.metadata["file_name"] = str(file_data)
|
||||
IngestionHelper._exclude_metadata(documents)
|
||||
return documents
|
||||
|
||||
@staticmethod
|
||||
def _load_file_to_documents(file_name: str, file_data: Path) -> list[Document]:
|
||||
logger.debug("Transforming file_name=%s into documents", file_name)
|
||||
logger.debug("Transforming file=%s into documents", str(file_data))
|
||||
extension = Path(file_name).suffix
|
||||
reader_cls = FILE_READER_CLS.get(extension)
|
||||
if reader_cls is None:
|
||||
|
@ -414,7 +414,7 @@ class PrivateGptUi:
|
||||
)
|
||||
ingested_dataset = gr.List(
|
||||
self._list_ingested_files,
|
||||
headers=["File name"],
|
||||
headers=["Files"],
|
||||
label="Ingested Files",
|
||||
height=235,
|
||||
interactive=False,
|
||||
|
Loading…
Reference in New Issue
Block a user