Spaces:
Sleeping
Sleeping
adham bohemeth
Browse files
app.py
CHANGED
|
@@ -87,6 +87,10 @@ def preprocess_image(image, model_choice, mode_choice):
|
|
| 87 |
image_hog = image_hog.reshape(1, -1)
|
| 88 |
return image_hog
|
| 89 |
else:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 90 |
image_hog = image_hog.reshape(1, -1)
|
| 91 |
return image_hog
|
| 92 |
|
|
|
|
| 87 |
image_hog = image_hog.reshape(1, -1)
|
| 88 |
return image_hog
|
| 89 |
else:
|
| 90 |
+
if model_choice == "GNB":
|
| 91 |
+
image_hog = image_hog.reshape(1, -1)
|
| 92 |
+
image_pca = pca.transform(image_hog)
|
| 93 |
+
return image_pca
|
| 94 |
image_hog = image_hog.reshape(1, -1)
|
| 95 |
return image_hog
|
| 96 |
|