Spaces:
Runtime error
Runtime error
allenchienxxx
commited on
Commit
·
6b0c8c9
1
Parent(s):
c26e87d
Update analze.py
Browse files
analze.py
CHANGED
@@ -31,9 +31,9 @@ def check_file_type(file):
|
|
31 |
else:
|
32 |
return "Please select .eml or .txt file."
|
33 |
|
34 |
-
def save_file(
|
35 |
-
with open(os.path.join('email files/',
|
36 |
-
f.write(
|
37 |
|
38 |
def text_feature(filepath):
|
39 |
text = get_text(filepath)
|
|
|
31 |
else:
|
32 |
return "Please select .eml or .txt file."
|
33 |
|
34 |
+
def save_file(up_file):
|
35 |
+
with open(os.path.join('email files/', up_file.name), 'wb') as f:
|
36 |
+
f.write(up_file.getbuffer())
|
37 |
|
38 |
def text_feature(filepath):
|
39 |
text = get_text(filepath)
|