MAnthony commited on
Commit
7fa8d07
·
verified ·
1 Parent(s): d939b78

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -6,11 +6,11 @@ from tf_bodypix.api import download_model, load_model, BodyPixModelPaths
6
  import numpy as np
7
  from PIL import Image
8
 
 
 
 
 
9
  def predict(image):
10
- # load model
11
- modelPath = download_model(BodyPixModelPaths.RESNET50_FLOAT_STRIDE_16)
12
- bodypix_model = load_model(modelPath)
13
-
14
  # get prediction result
15
  image_array = tf.keras.preprocessing.image.img_to_array(image)
16
  result = bodypix_model.predict_single(image_array)
 
6
  import numpy as np
7
  from PIL import Image
8
 
9
+ # load model
10
+ modelPath = download_model(BodyPixModelPaths.RESNET50_FLOAT_STRIDE_16)
11
+ bodypix_model = load_model(modelPath)
12
+
13
  def predict(image):
 
 
 
 
14
  # get prediction result
15
  image_array = tf.keras.preprocessing.image.img_to_array(image)
16
  result = bodypix_model.predict_single(image_array)