allenchienxxx commited on
Commit
6b0c8c9
·
1 Parent(s): c26e87d

Update analze.py

Browse files
Files changed (1) hide show
  1. analze.py +3 -3
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(file):
35
- with open(os.path.join('email files/', file.name), 'wb') as f:
36
- f.write(file.getbuffer())
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)