Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ model.compile(optimizer=tf.keras.optimizers.Adam(learning_rate=0.0005),
|
|
62 |
metrics=['accuracy', tf.keras.metrics.Precision(), tf.keras.metrics.Recall()])
|
63 |
|
64 |
# Chatbot setup
|
65 |
-
access_token = '
|
66 |
chatbot = Conversation(access_token)
|
67 |
|
68 |
# Function to preprocess input
|
@@ -116,13 +116,13 @@ def interface(input_text, input_type):
|
|
116 |
iface = gr.Interface(
|
117 |
fn=interface,
|
118 |
inputs=[
|
119 |
-
gr.
|
120 |
-
gr.
|
121 |
],
|
122 |
outputs=[
|
123 |
-
"
|
124 |
-
gr.
|
125 |
-
gr.
|
126 |
],
|
127 |
title="Phishing Detection with Enhanced EWC Model",
|
128 |
description="Check if a URL or HTML is Phishing. Latest phishing sites from PhishTank and a chatbot assistant for phishing issues.",
|
|
|
62 |
metrics=['accuracy', tf.keras.metrics.Precision(), tf.keras.metrics.Recall()])
|
63 |
|
64 |
# Chatbot setup
|
65 |
+
access_token = 'eyh-bc'
|
66 |
chatbot = Conversation(access_token)
|
67 |
|
68 |
# Function to preprocess input
|
|
|
116 |
iface = gr.Interface(
|
117 |
fn=interface,
|
118 |
inputs=[
|
119 |
+
gr.components.Textbox(lines=5, placeholder="Enter URL or HTML code"),
|
120 |
+
gr.components.Radio(["URL", "HTML"], type="value", label="Input Type")
|
121 |
],
|
122 |
outputs=[
|
123 |
+
gr.components.Textbox(label="Phishing Detection Result"),
|
124 |
+
gr.components.Textbox(label="Latest Phishing Sites"),
|
125 |
+
gr.components.Textbox(label="Chatbot Response")
|
126 |
],
|
127 |
title="Phishing Detection with Enhanced EWC Model",
|
128 |
description="Check if a URL or HTML is Phishing. Latest phishing sites from PhishTank and a chatbot assistant for phishing issues.",
|