1
0
mirror of https://github.com/imartinez/privateGPT.git synced 2025-05-08 16:28:06 +00:00
This commit is contained in:
Omar Trigui 2024-12-15 15:25:38 +00:00 committed by GitHub
commit f17c8e69ca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions
private_gpt
components/ingest
ui

View File

@ -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:

View File

@ -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,