Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,6 @@ def load_image_into_numpy_array(path):
|
|
32 |
|
33 |
def load_model():
|
34 |
download_dir = snapshot_download(REPO_ID)
|
35 |
-
# download_dir = os.path.join(download_dir, "saved_model")
|
36 |
saved_model_dir = os.path.join(download_dir, "saved_model")
|
37 |
detection_model = tf.saved_model.load(saved_model_dir)
|
38 |
return detection_model
|
@@ -69,7 +68,7 @@ def predict2(image_np):
|
|
69 |
max_boxes_to_draw=200,
|
70 |
min_score_thresh=0.60,
|
71 |
agnostic_mode=False,
|
72 |
-
line_thickness=
|
73 |
|
74 |
result_pil_img = tf.keras.utils.array_to_img(image_np_with_detections[0])
|
75 |
return result_pil_img
|
|
|
32 |
|
33 |
def load_model():
|
34 |
download_dir = snapshot_download(REPO_ID)
|
|
|
35 |
saved_model_dir = os.path.join(download_dir, "saved_model")
|
36 |
detection_model = tf.saved_model.load(saved_model_dir)
|
37 |
return detection_model
|
|
|
68 |
max_boxes_to_draw=200,
|
69 |
min_score_thresh=0.60,
|
70 |
agnostic_mode=False,
|
71 |
+
line_thickness=2)
|
72 |
|
73 |
result_pil_img = tf.keras.utils.array_to_img(image_np_with_detections[0])
|
74 |
return result_pil_img
|