Commit
·
5ccb381
1
Parent(s):
9d6dd0f
Update app.py
Browse files
app.py
CHANGED
@@ -43,8 +43,9 @@ def get_text_file(docs):
|
|
43 |
process_txt_file(file_content)
|
44 |
else:
|
45 |
try:
|
46 |
-
|
47 |
-
|
|
|
48 |
pass
|
49 |
|
50 |
return text_list
|
@@ -53,6 +54,7 @@ def get_text_file(docs):
|
|
53 |
|
54 |
|
55 |
|
|
|
56 |
def get_csv_file(docs):
|
57 |
text_list = []
|
58 |
for doc in docs:
|
|
|
43 |
process_txt_file(file_content)
|
44 |
else:
|
45 |
try:
|
46 |
+
text_content = file_content.decode('utf-8')
|
47 |
+
process_txt_file(text_content)
|
48 |
+
except (UnicodeDecodeError, AttributeError):
|
49 |
pass
|
50 |
|
51 |
return text_list
|
|
|
54 |
|
55 |
|
56 |
|
57 |
+
|
58 |
def get_csv_file(docs):
|
59 |
text_list = []
|
60 |
for doc in docs:
|