Spaces:
Sleeping
Sleeping
errorssss
Browse files
app.py
CHANGED
|
@@ -151,7 +151,8 @@ def classify_binary_dt(image):
|
|
| 151 |
|
| 152 |
def classify_binary_svm(image):
|
| 153 |
processed_image = preprocess_image(image, "SVM", "Binary")
|
| 154 |
-
|
|
|
|
| 155 |
|
| 156 |
if prediction[0] == 1:
|
| 157 |
return "SVM Binary: Is 6"
|
|
@@ -206,7 +207,8 @@ def classify_multimode_svm(image):
|
|
| 206 |
return "SVM Multimode model placeholder: model is not inserted yet."
|
| 207 |
|
| 208 |
processed_image = preprocess_image(image, "SVM", "Multimode")
|
| 209 |
-
|
|
|
|
| 210 |
return "SVM Multimode prediction: " + str(prediction[0])
|
| 211 |
|
| 212 |
|
|
|
|
| 151 |
|
| 152 |
def classify_binary_svm(image):
|
| 153 |
processed_image = preprocess_image(image, "SVM", "Binary")
|
| 154 |
+
scaled = svm_scaler.transform(processed_image)
|
| 155 |
+
prediction = svm_binary_model.predict(scaled)
|
| 156 |
|
| 157 |
if prediction[0] == 1:
|
| 158 |
return "SVM Binary: Is 6"
|
|
|
|
| 207 |
return "SVM Multimode model placeholder: model is not inserted yet."
|
| 208 |
|
| 209 |
processed_image = preprocess_image(image, "SVM", "Multimode")
|
| 210 |
+
scaled = svm_multimode_scaler.transform(processed_image)
|
| 211 |
+
prediction = svm_multimode_model.predict(scaled)
|
| 212 |
return "SVM Multimode prediction: " + str(prediction[0])
|
| 213 |
|
| 214 |
|