Spaces:
Runtime error
Runtime error
app.py
CHANGED
|
@@ -148,12 +148,12 @@ def main():
|
|
| 148 |
doc_list = []
|
| 149 |
|
| 150 |
for file in docs:
|
| 151 |
-
raise Exception(file.type)
|
| 152 |
print('file - type : ', file.type)
|
| 153 |
if file.type == 'text/plain':
|
| 154 |
# file is .txt
|
| 155 |
doc_list.extend(get_text_file(file))
|
| 156 |
-
elif file.type in ['application/octet-stream', 'application/pdf']:
|
| 157 |
# file is .pdf
|
| 158 |
doc_list.extend(get_pdf_text(file))
|
| 159 |
elif file.type == 'text/csv':
|
|
|
|
| 148 |
doc_list = []
|
| 149 |
|
| 150 |
for file in docs:
|
| 151 |
+
# raise Exception(file.type)
|
| 152 |
print('file - type : ', file.type)
|
| 153 |
if file.type == 'text/plain':
|
| 154 |
# file is .txt
|
| 155 |
doc_list.extend(get_text_file(file))
|
| 156 |
+
elif file.type in ['application/octet-stream', 'application/pdf', 'application/haansoftpdf']:
|
| 157 |
# file is .pdf
|
| 158 |
doc_list.extend(get_pdf_text(file))
|
| 159 |
elif file.type == 'text/csv':
|