amirTamer commited on
Commit
b41ea03
·
1 Parent(s): a40d10a
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -45,6 +45,7 @@ def preprocess_image(image):
45
  image_N,
46
  **hog_params #Zay el ... fi el JS el spread
47
  )
 
48
  image_pca = pca.transform(image_hog)
49
  return image_pca
50
 
@@ -59,7 +60,7 @@ def classify_image(image):
59
  processedImage,
60
  class_weights={0: 1.0, 1: best_weight}
61
  )
62
- if pred == 1:
63
  return "Is 6"
64
  else:
65
  return "Not 6"
 
45
  image_N,
46
  **hog_params #Zay el ... fi el JS el spread
47
  )
48
+ image_hog = image_hog.reshape(1, -1)
49
  image_pca = pca.transform(image_hog)
50
  return image_pca
51
 
 
60
  processedImage,
61
  class_weights={0: 1.0, 1: best_weight}
62
  )
63
+ if pred[0] == 1:
64
  return "Is 6"
65
  else:
66
  return "Not 6"