from analze import * import streamlit as st def main(): st.title("Phishing Email Filtering Service") const uploaded_file = st.file_uploader("Upload a file", type=['eml', 'txt']) if uploaded_file is not None: st.success("File uploaded successfully!") Txtf = text_feature(uploaded_file) Htmlf = html_tags_feature(uploaded_file) Numf = num_feature(uploaded_file) Extraf = extra_feature(uploaded_file) # feat = get_features(uploaded_file) # feat.at[0,"text"] = txt.at[0,"text"] # columns = feat.columns.tolist() # columns = [columns[-1]] + columns[:-1] # feat = feat[columns] # st.write(uploaded_file.read()) # st.write(feat) # st.write(txt) st.write("Text Prediction: "+predict_content(Txtf)) st.write("HTML Tags Prediction: "+predict_html(Htmlf)) st.write("Numeric Features Prediction: "+predict_num(Numf)) st.write("Extra Features Prediction: "+predict_extra(Extraf)) if __name__ == '__main__': main()