Commit
·
122faa5
1
Parent(s):
0766cac
Update Sniffer_AI.py
Browse files- Sniffer_AI.py +9 -3
Sniffer_AI.py
CHANGED
|
@@ -1,11 +1,17 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import joblib
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
|
| 4 |
# Load the saved models
|
| 5 |
rf_model = joblib.load('rf_model.pkl')
|
| 6 |
-
dt_model = joblib.load('
|
| 7 |
-
bagging_model = joblib.load('
|
| 8 |
-
ada_model = joblib.load('
|
| 9 |
|
| 10 |
class_labels = {
|
| 11 |
0: "normal",
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import joblib
|
| 3 |
+
import requests
|
| 4 |
+
import os
|
| 5 |
+
|
| 6 |
+
from sklearn.ensemble import RandomForestClassifier, BaggingClassifier, AdaBoostClassifier
|
| 7 |
+
from sklearn.tree import DecisionTreeClassifier
|
| 8 |
+
|
| 9 |
|
| 10 |
# Load the saved models
|
| 11 |
rf_model = joblib.load('rf_model.pkl')
|
| 12 |
+
dt_model = joblib.load('decision_tree_model.pkl')
|
| 13 |
+
bagging_model = joblib.load('model_bagging.pkl')
|
| 14 |
+
ada_model = joblib.load('model_adaboost.pkl')
|
| 15 |
|
| 16 |
class_labels = {
|
| 17 |
0: "normal",
|