Spaces:
Sleeping
Sleeping
Commit
·
09d545a
1
Parent(s):
c298be5
Removed logging of example images
Browse files
yolo-inference-project/src/app.py
CHANGED
@@ -22,6 +22,13 @@ project = rf.workspace(workspaceId).project(projectId)
|
|
22 |
def save_image_to_roboflow(image_path, model_name, conf_thresh):
|
23 |
"""Save flagged images to roboflow."""
|
24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
project.upload(image_path)
|
26 |
|
27 |
|
|
|
22 |
def save_image_to_roboflow(image_path, model_name, conf_thresh):
|
23 |
"""Save flagged images to roboflow."""
|
24 |
|
25 |
+
|
26 |
+
# don't send if it is an example image
|
27 |
+
# original path is examples/smaller_many_cans.jpg, but once it has gone through inference, it is now in /tmp/gradio/ folder
|
28 |
+
# so we need to check if it is in the examples folder
|
29 |
+
# we need to get the last part of the path to check if it is in the examples folder
|
30 |
+
if image_path.split("/")[-1] in [i.split("/")[-1] for i in [x[0] for x in image_paths]]:
|
31 |
+
return
|
32 |
project.upload(image_path)
|
33 |
|
34 |
|