FedeFT commited on
Commit
f95f226
·
verified ·
1 Parent(s): 238ec30

Trying to update to work with keras v3

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -191,7 +191,9 @@ if __name__=='__main__':
191
  print(dir_list)
192
 
193
  gaze_model_path = 'LAEO_demo_data/head_pose_estimation'
194
- gaze_model = tf.keras.models.load_model(gaze_model_path, custom_objects={"tf": tf})
 
 
195
  path_to_model = 'LAEO_demo_data/keypoint_detector/centernet_hg104_512x512_kpts_coco17_tpu-32'
196
  model = tf.saved_model.load(os.path.join(path_to_model, 'saved_model'))
197
 
 
191
  print(dir_list)
192
 
193
  gaze_model_path = 'LAEO_demo_data/head_pose_estimation'
194
+ # updating
195
+ gaze_model = keras.layers.TFSMLayer(gaze_model_path, call_endpoint='serving_default')
196
+ # gaze_model = tf.keras.models.load_model(gaze_model_path, custom_objects={"tf": tf})
197
  path_to_model = 'LAEO_demo_data/keypoint_detector/centernet_hg104_512x512_kpts_coco17_tpu-32'
198
  model = tf.saved_model.load(os.path.join(path_to_model, 'saved_model'))
199