LaurentiuStancioiu commited on
Commit
2cc1d63
·
verified ·
1 Parent(s): 656705e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
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
- ).interactive()
 
 
 
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=True) # Ensure the output is interactive
73
- plot_output = gr.Plot(label="Website Embedding Plot", height = 500, width= 750)
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)