Spaces:
Runtime error
Runtime error
danushkhanna
commited on
Commit
·
d98619a
1
Parent(s):
a39f85b
Update app.py
Browse files
app.py
CHANGED
@@ -21,18 +21,6 @@ def get_model():
|
|
21 |
phishing_url_detector = pickle.load(pickle_model)
|
22 |
return phishing_url_detector
|
23 |
|
24 |
-
# THEME AND COLORS:
|
25 |
-
theme_config = st.config.get_option("theme")
|
26 |
-
|
27 |
-
# Define the theme colors for positive and negative results
|
28 |
-
positive_color = "#00FF00" # Green
|
29 |
-
negative_color = "#FF0000" # Red
|
30 |
-
|
31 |
-
# Set the initial theme colors
|
32 |
-
theme_config["theme.success"] = {"backgroundColor": positive_color}
|
33 |
-
theme_config["theme.error"] = {"backgroundColor": negative_color}
|
34 |
-
st.config.set_option("theme", theme_config)
|
35 |
-
|
36 |
st.title("Phishing Website Detector")
|
37 |
st.header("Are you sure your 'bank' sent that link?")
|
38 |
|
@@ -57,10 +45,8 @@ if input_url != "":
|
|
57 |
prediction = phishing_url_detector.predict(features_dataframe)
|
58 |
if prediction == int(True):
|
59 |
prediction_str = 'Phishing Website. Do not click!'
|
60 |
-
theme_config["theme.error"]["backgroundColor"] = negative_color
|
61 |
elif prediction == int(False):
|
62 |
prediction_str = 'Not Phishing Website, stay safe!'
|
63 |
-
theme_config["theme.success"]["backgroundColor"] = positive_color
|
64 |
else:
|
65 |
prediction_str = ''
|
66 |
st.write(prediction_str)
|
|
|
21 |
phishing_url_detector = pickle.load(pickle_model)
|
22 |
return phishing_url_detector
|
23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
24 |
st.title("Phishing Website Detector")
|
25 |
st.header("Are you sure your 'bank' sent that link?")
|
26 |
|
|
|
45 |
prediction = phishing_url_detector.predict(features_dataframe)
|
46 |
if prediction == int(True):
|
47 |
prediction_str = 'Phishing Website. Do not click!'
|
|
|
48 |
elif prediction == int(False):
|
49 |
prediction_str = 'Not Phishing Website, stay safe!'
|
|
|
50 |
else:
|
51 |
prediction_str = ''
|
52 |
st.write(prediction_str)
|