SilverDragon9 commited on
Commit
970a522
·
1 Parent(s): fb43b33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -76,10 +76,10 @@ def detect_intrusion(*feature_values, label_value, model_choice="Random Forest")
76
  return f"Intrusion Detected: {class_labels.get(predicted_class, 'Unknown Attack')}"
77
 
78
  # Create Gradio input fields for each feature (excluding label initially)
79
- inputs = [gr.Textbox(label=feature_name) for feature_name in feature_names[:-1]] # Exclude the last one (label) from inputs
80
 
81
  # Add label input field
82
- inputs.append(gr.Textbox(label="Label (0-9, corresponding to attack type)"))
83
 
84
  # Add model choice dropdown
85
  inputs.append(gr.Dropdown(choices=["Random Forest", "Decision Tree", "Bagging Classifier", "AdaBoost Classifier"], label="Select Model"))
 
76
  return f"Intrusion Detected: {class_labels.get(predicted_class, 'Unknown Attack')}"
77
 
78
  # Create Gradio input fields for each feature (excluding label initially)
79
+ inputs = [gr.Textbox(label=feature_name) for feature_name in feature_names[:]] # Exclude the last one (label) from inputs
80
 
81
  # Add label input field
82
+ # inputs.append(gr.Textbox(label="label"))
83
 
84
  # Add model choice dropdown
85
  inputs.append(gr.Dropdown(choices=["Random Forest", "Decision Tree", "Bagging Classifier", "AdaBoost Classifier"], label="Select Model"))