tommy24 commited on
Commit
baf40d2
·
1 Parent(s): 445fcd6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -337,8 +337,8 @@ data = None
337
 
338
  np.set_printoptions(suppress=True)
339
 
340
- # Load the model outside of the function
341
  model = tf.keras.models.load_model('keras_model.h5')
 
342
 
343
  # Load labels from a file
344
  with open("labels.txt", "r") as file:
@@ -362,7 +362,6 @@ def classify(platform, UserInput, Images, Textbox2, Textbox3):
362
  image_data = get_image.content
363
  elif platform == "web":
364
  print("WEB")
365
- # Handle web case if needed
366
  else:
367
  pass
368
 
 
337
 
338
  np.set_printoptions(suppress=True)
339
 
 
340
  model = tf.keras.models.load_model('keras_model.h5')
341
+ data = np.ndarray(shape=(1, 224, 224, 3), dtype=np.float32)
342
 
343
  # Load labels from a file
344
  with open("labels.txt", "r") as file:
 
362
  image_data = get_image.content
363
  elif platform == "web":
364
  print("WEB")
 
365
  else:
366
  pass
367