Conner commited on
Commit
acf4e33
·
1 Parent(s): ce411ec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -22,11 +22,9 @@ def predict(img):
22
  size = (224, 224)
23
  image = ImageOps.fit(image, size)
24
  #turn the image into a numpy array
25
- image_array = np.asarray(image)
26
- # Normalize the image
27
- normalized_image_array = (image_array.astype(np.float32) / 127.0) - 1
28
- # Load the image into the array
29
- data[0] = normalized_image_array
30
  # run the inference
31
  prediction = model.predict(data)
32
  gr.outputs.Label = open(labels.txt)
 
22
  size = (224, 224)
23
  image = ImageOps.fit(image, size)
24
  #turn the image into a numpy array
25
+
26
+
27
+ data[0] = np.asarray(image)
 
 
28
  # run the inference
29
  prediction = model.predict(data)
30
  gr.outputs.Label = open(labels.txt)