Spaces:
Runtime error
Runtime error
Commit
·
d440983
1
Parent(s):
a4afd63
Update app.py
Browse files
app.py
CHANGED
@@ -51,19 +51,19 @@ import gradio as gr
|
|
51 |
import tempfile
|
52 |
|
53 |
FILE_LOADER_MAPPING = {
|
54 |
-
"
|
55 |
-
"
|
56 |
-
"
|
57 |
-
"
|
58 |
-
"
|
59 |
-
"
|
60 |
-
"
|
61 |
-
"
|
62 |
-
"
|
63 |
-
"
|
64 |
-
"
|
65 |
-
"
|
66 |
-
"
|
67 |
# Add more mappings for other file extensions and loaders as needed
|
68 |
}
|
69 |
|
|
|
51 |
import tempfile
|
52 |
|
53 |
FILE_LOADER_MAPPING = {
|
54 |
+
"csv": (CSVLoader, {"encoding": "utf-8"}),
|
55 |
+
"doc": (UnstructuredWordDocumentLoader, {}),
|
56 |
+
"docx": (UnstructuredWordDocumentLoader, {}),
|
57 |
+
"epub": (UnstructuredEPubLoader, {}),
|
58 |
+
"html": (UnstructuredHTMLLoader, {}),
|
59 |
+
"md": (UnstructuredMarkdownLoader, {}),
|
60 |
+
"odt": (UnstructuredODTLoader, {}),
|
61 |
+
"pdf": (PyPDFLoader, {}),
|
62 |
+
"ppt": (UnstructuredPowerPointLoader, {}),
|
63 |
+
"pptx": (UnstructuredPowerPointLoader, {}),
|
64 |
+
"txt": (TextLoader, {"encoding": "utf8"}),
|
65 |
+
"ipynb": (NotebookLoader, {}),
|
66 |
+
"py": (PythonLoader, {}),
|
67 |
# Add more mappings for other file extensions and loaders as needed
|
68 |
}
|
69 |
|