tommy24 commited on
Commit
6d6b646
·
1 Parent(s): c616b46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,7 +28,8 @@ with open("labels.txt", "r") as file:
28
 
29
  def classify(image_path):
30
  try:
31
- image = cv.imread(image_path)
 
32
  image = cv.resize(image, (224, 224))
33
  image_array = np.asarray(image)
34
  normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
 
28
 
29
  def classify(image_path):
30
  try:
31
+ image_data = image_path.numpy()
32
+ # image = cv.imread(image_path)
33
  image = cv.resize(image, (224, 224))
34
  image_array = np.asarray(image)
35
  normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1