allenchienxxx commited on
Commit
7474a76
1 Parent(s): 4fbac0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -6,12 +6,15 @@ def main():
6
  uploaded_file = st.file_uploader("Upload a file", type=['eml', 'txt'])
7
  if uploaded_file is not None:
8
  st.success("File uploaded successfully!")
 
 
 
9
  # Process the file here
10
  # st.write(uploaded_file.read())
11
- st.write(get_features(uploaded_file))
12
- st.write(text_feature(uploaded_file))
13
- st.write(predict_content(text_feature(uploaded_file)))
14
- st.write(predict_html(html_tags_feature(uploaded_file)))
15
  st.write(predict_num(num_feature(uploaded_file)))
16
  st.write(predict_extra(extra_feature(uploaded_file)))
17
 
 
6
  uploaded_file = st.file_uploader("Upload a file", type=['eml', 'txt'])
7
  if uploaded_file is not None:
8
  st.success("File uploaded successfully!")
9
+ txt = text_feature(uploaded_file)
10
+ feat = get_features(uploaded_file)
11
+ feat.at[0,"text"] = txt.at[0,"text"]
12
  # Process the file here
13
  # st.write(uploaded_file.read())
14
+ st.write(feat)
15
+ # st.write(txt)
16
+ st.write(predict_content(txt))
17
+ st.write(predict_html(html_tags_feature(uploaded_file)))
18
  st.write(predict_num(num_feature(uploaded_file)))
19
  st.write(predict_extra(extra_feature(uploaded_file)))
20