Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -103,7 +103,10 @@ def read_document(file, clean=True):
|
|
103 |
|
104 |
kind = filetype.guess(file_content)
|
105 |
|
106 |
-
|
|
|
|
|
|
|
107 |
|
108 |
if mime == "application/pdf":
|
109 |
# PDF Handling (unchanged)
|
|
|
103 |
|
104 |
kind = filetype.guess(file_content)
|
105 |
|
106 |
+
if kind is None:
|
107 |
+
mime = "text"
|
108 |
+
else:
|
109 |
+
mime = kind.mime
|
110 |
|
111 |
if mime == "application/pdf":
|
112 |
# PDF Handling (unchanged)
|