Kwasiasomani commited on
Commit
828e5f0
·
verified ·
1 Parent(s): c2416d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -14
app.py CHANGED
@@ -59,20 +59,6 @@ def display_prediction(prediction, prediction_probabilities):
59
  prob_df = pd.DataFrame(prediction_probabilities, index=class_labels, columns=["Probability"])
60
  st.bar_chart(prob_df)
61
 
62
- # Example chart: Feature Importance
63
- st.subheader("Feature Importance:")
64
- feature_importance = np.random.rand(len(class_labels)) # Random feature importance values for demonstration
65
- features_names = ['use_of_ip_address', 'abnormal_url', 'google_index', 'count_www', 'count@',
66
- 'count_dir', 'count_embed_domian', 'short_url', 'count_https',
67
- 'count_http', 'count%', 'count?', 'count-', 'count=', 'url_length',
68
- 'hostname_length', 'sus_url', 'fd_length', 'tld_length', 'count-digits',
69
- 'count-letters']
70
-
71
- fig, ax = plt.subplots()
72
- ax.barh(features_names, feature_importance, color='skyblue')
73
- ax.set_xlabel('Importance')
74
- ax.set_title('Feature Importance')
75
- st.pyplot(fig)
76
 
77
  # Another example chart: Prediction distribution (simulated)
78
  st.subheader("Prediction Distribution (Simulated):")
 
59
  prob_df = pd.DataFrame(prediction_probabilities, index=class_labels, columns=["Probability"])
60
  st.bar_chart(prob_df)
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
 
63
  # Another example chart: Prediction distribution (simulated)
64
  st.subheader("Prediction Distribution (Simulated):")