jiawenchim commited on
Commit
9b64a9d
·
1 Parent(s): a872719

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -29,8 +29,9 @@ def load_image_into_numpy_array(path):
29
  return pil_image_as_numpy_array(image)
30
 
31
  def load_model():
32
- model_dir = 'saved_model'
33
- detection_model = tf.saved_model.load(str(model_dir))
 
34
  return detection_model
35
 
36
  # samples_folder = 'test_samples
 
29
  return pil_image_as_numpy_array(image)
30
 
31
  def load_model():
32
+ download_dir = snapshot_download(REPO_ID)
33
+ saved_model_dir = os.path.join(download_dir, "saved_model")
34
+ detection_model = tf.saved_model.load(saved_model_dir)
35
  return detection_model
36
 
37
  # samples_folder = 'test_samples