zxcgqq commited on
Commit
d11611b
1 Parent(s): eefde8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ import tensorflow_hub as hub
11
 
12
 
13
  IMAGE_DIM = 299 # required/default image dimensionality
14
- model = load_model("nsfw.299x299.h5")
15
 
16
  def load_images(image_paths, image_size, verbose=True):
17
  loaded_images = []
 
11
 
12
 
13
  IMAGE_DIM = 299 # required/default image dimensionality
14
+ model = tf.keras.models.load_model("nsfw.299x299.h5", custom_objects={'KerasLayer': hub.KerasLayer},compile=False)
15
 
16
  def load_images(image_paths, image_size, verbose=True):
17
  loaded_images = []