Spaces:
Sleeping
Sleeping
hoping no errors
Browse files
app.py
CHANGED
|
@@ -115,7 +115,7 @@ def preprocess_image(image, model_choice, mode_choice):
|
|
| 115 |
scaled_img = svm_scaler.transform(image_r)
|
| 116 |
scaled_img = scaled_img.reshape(28,28)
|
| 117 |
svm_img_hog = hog(scaled_img, **hog_params)
|
| 118 |
-
return svm_img_hog
|
| 119 |
else:
|
| 120 |
image_hog = image_hog.reshape(1, -1)
|
| 121 |
return image_hog
|
|
|
|
| 115 |
scaled_img = svm_scaler.transform(image_r)
|
| 116 |
scaled_img = scaled_img.reshape(28,28)
|
| 117 |
svm_img_hog = hog(scaled_img, **hog_params)
|
| 118 |
+
return svm_img_hog.reshape(1, -1)
|
| 119 |
else:
|
| 120 |
image_hog = image_hog.reshape(1, -1)
|
| 121 |
return image_hog
|