YchKhan commited on
Commit
bb87660
·
verified ·
1 Parent(s): b4815dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -53,21 +53,21 @@ with gr.Blocks() as demo:
53
  filtered_data_table = gr.Dataframe(label="Filtered Data")
54
 
55
  with gr.Row():
56
- fig1_display = gr.HTML(label="Logins by Country")
57
- fig2_display = gr.HTML(label="Session Duration by Gender")
58
 
59
  with gr.Row():
60
- fig3_display = gr.HTML(label="Data Breaches by Country")
61
- fig4_display = gr.HTML(label="2FA Usage")
62
 
63
  def update_dashboard(countries, genders, statuses):
64
  filtered_data, fig1, fig2, fig3, fig4 = generate_dashboard(countries, genders, statuses)
65
  return (
66
  filtered_data,
67
- fig1.to_html(),
68
- fig2.to_html(),
69
- fig3.to_html(),
70
- fig4.to_html()
71
  )
72
 
73
  update_button = gr.Button("Update Dashboard")
 
53
  filtered_data_table = gr.Dataframe(label="Filtered Data")
54
 
55
  with gr.Row():
56
+ fig1_display = gr.Plot(label="Logins by Country")
57
+ fig2_display = gr.Plot(label="Session Duration by Gender")
58
 
59
  with gr.Row():
60
+ fig3_display = gr.Plot(label="Data Breaches by Country")
61
+ fig4_display = gr.Plot(label="2FA Usage")
62
 
63
  def update_dashboard(countries, genders, statuses):
64
  filtered_data, fig1, fig2, fig3, fig4 = generate_dashboard(countries, genders, statuses)
65
  return (
66
  filtered_data,
67
+ fig1,
68
+ fig2,
69
+ fig3,
70
+ fig4
71
  )
72
 
73
  update_button = gr.Button("Update Dashboard")