905saini commited on
Commit
833b9d8
·
1 Parent(s): 07738b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ model = tf.saved_model.load("best_saved_model") #Loading the saved model
11
  def process_img(img):
12
  img = img.resize((640,640)) # resize the image as reqired for the model input
13
  copy_img = img.copy()
14
- img = np.array(img/255) # Normalizing the picel value
15
  img = img.astype("float32") # Convert the format double to format float
16
  img = np.expand_dims(img,axis=0) # exapanding dimension to add batch
17
  return img,copy_img
 
11
  def process_img(img):
12
  img = img.resize((640,640)) # resize the image as reqired for the model input
13
  copy_img = img.copy()
14
+ img = np.array(img)/255 # Normalizing the picel value
15
  img = img.astype("float32") # Convert the format double to format float
16
  img = np.expand_dims(img,axis=0) # exapanding dimension to add batch
17
  return img,copy_img