Minor error
Browse files
app.py
CHANGED
|
@@ -51,17 +51,17 @@ if uploaded_file is not None:
|
|
| 51 |
|
| 52 |
# Load the selected model
|
| 53 |
if model_name == "K-Nearest Neighbors - (Single Label)":
|
| 54 |
-
model = joblib.load("
|
| 55 |
elif model_name == "Logistic Regression - (Single Label)":
|
| 56 |
-
model = joblib.load("
|
| 57 |
elif model_name == "Support Vector Machines - (Single Label)":
|
| 58 |
-
model = joblib.load("
|
| 59 |
elif model_name == "Neural Network - (Single Label)":
|
| 60 |
-
model = joblib.load("
|
| 61 |
elif model_name == "XGB Classifier - (Single Label)":
|
| 62 |
-
model = joblib.load("
|
| 63 |
elif model_name == "XGB - (Multi Label)":
|
| 64 |
-
model = joblib.load("
|
| 65 |
elif model_name == "Convolutional Recurrent Neural Network - (Multi Label)":
|
| 66 |
model = tensorflow.keras.models.load_model("../models/model_crnn1.h5", compile=False)
|
| 67 |
model.compile(loss=binary_crossentropy,
|
|
@@ -136,4 +136,4 @@ if uploaded_file is not None:
|
|
| 136 |
else:
|
| 137 |
predicted_label = model.predict(features)[0]
|
| 138 |
st.write(f"Predicted Genre: {predicted_label}")
|
| 139 |
-
st.metric("Predicted Genre:",
|
|
|
|
| 51 |
|
| 52 |
# Load the selected model
|
| 53 |
if model_name == "K-Nearest Neighbors - (Single Label)":
|
| 54 |
+
model = joblib.load("./models/knn.pkl")
|
| 55 |
elif model_name == "Logistic Regression - (Single Label)":
|
| 56 |
+
model = joblib.load("./models/logistic.pkl")
|
| 57 |
elif model_name == "Support Vector Machines - (Single Label)":
|
| 58 |
+
model = joblib.load("./models/svm.pkl")
|
| 59 |
elif model_name == "Neural Network - (Single Label)":
|
| 60 |
+
model = joblib.load("./models/nn.pkl")
|
| 61 |
elif model_name == "XGB Classifier - (Single Label)":
|
| 62 |
+
model = joblib.load("./models/xgb.pkl")
|
| 63 |
elif model_name == "XGB - (Multi Label)":
|
| 64 |
+
model = joblib.load("./models/xgb_mlb.pkl")
|
| 65 |
elif model_name == "Convolutional Recurrent Neural Network - (Multi Label)":
|
| 66 |
model = tensorflow.keras.models.load_model("../models/model_crnn1.h5", compile=False)
|
| 67 |
model.compile(loss=binary_crossentropy,
|
|
|
|
| 136 |
else:
|
| 137 |
predicted_label = model.predict(features)[0]
|
| 138 |
st.write(f"Predicted Genre: {predicted_label}")
|
| 139 |
+
st.metric("Predicted Genre:",str(predicted_label))
|