Spaces:
Runtime error
Runtime error
danushkhanna
commited on
Commit
·
144c5a0
1
Parent(s):
f69de80
Update app.py
Browse files
app.py
CHANGED
@@ -29,8 +29,8 @@ def get_model():
|
|
29 |
negative_color = "#FF0000" # Red
|
30 |
|
31 |
# Set the initial theme colors
|
32 |
-
theme_config["theme"]
|
33 |
-
theme_config["theme"]
|
34 |
st.config.set_option("theme", theme_config)
|
35 |
|
36 |
st.title("Phishing Website Detector")
|
@@ -57,10 +57,10 @@ 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"]["
|
61 |
elif prediction == int(False):
|
62 |
prediction_str = 'Not Phishing Website, stay safe!'
|
63 |
-
theme_config["theme"]["
|
64 |
else:
|
65 |
prediction_str = ''
|
66 |
st.write(prediction_str)
|
|
|
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")
|
|
|
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)
|