Spaces:
Runtime error
Runtime error
LaurentiuStancioiu
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -49,7 +49,10 @@ def get_plot(website: Optional[str], matrix=matrix, df=df) -> alt.Chart:
|
|
49 |
y='y',
|
50 |
color=alt.Color('type', scale=scale),
|
51 |
tooltip=['type', 'url']
|
52 |
-
).
|
|
|
|
|
|
|
53 |
return scatter_plot
|
54 |
else:
|
55 |
return None
|
@@ -69,8 +72,8 @@ def gradio_app():
|
|
69 |
gr.Markdown("This tool helps you identify potentially malicious websites. \n **Note:** This is a demonstration and results may not be accurate.")
|
70 |
website_input = gr.Textbox(label="Enter website URL")
|
71 |
predict_button = gr.Button("Predict")
|
72 |
-
prediction_output = gr.Textbox(label="Prediction", interactive=
|
73 |
-
plot_output = gr.Plot(label="Website Embedding Plot"
|
74 |
|
75 |
def update_output(website):
|
76 |
prediction = predict_label(website)
|
|
|
49 |
y='y',
|
50 |
color=alt.Color('type', scale=scale),
|
51 |
tooltip=['type', 'url']
|
52 |
+
).properties(
|
53 |
+
width=800,
|
54 |
+
height=500
|
55 |
+
).configure(background="#FDF7F0").interactive()
|
56 |
return scatter_plot
|
57 |
else:
|
58 |
return None
|
|
|
72 |
gr.Markdown("This tool helps you identify potentially malicious websites. \n **Note:** This is a demonstration and results may not be accurate.")
|
73 |
website_input = gr.Textbox(label="Enter website URL")
|
74 |
predict_button = gr.Button("Predict")
|
75 |
+
prediction_output = gr.Textbox(label="Prediction", interactive=False) # Ensure the output is interactive
|
76 |
+
plot_output = gr.Plot(label="Website Embedding Plot")
|
77 |
|
78 |
def update_output(website):
|
79 |
prediction = predict_label(website)
|