Skip to content

Commit

Permalink
refactor for new SDK version
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolaiPetukhov committed Jun 7, 2024
1 parent 10c2c9e commit dbad8f1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions supervisely_integration/serve/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,9 @@ def smart_segmentation(response: Response, request: Request):
smtool_state,
api,
app_dir,
cache_load_img=self.download_image,
cache_load_frame=self.download_frame,
cache_load_img_hash=self.download_image_by_hash,
cache_load_img=self.cache.download_image,
cache_load_frame=self.cache.download_frame,
cache_load_img_hash=self.cache.download_image_by_hash,
)
self._inference_image_cache.set(hash_str, image_np)
else:
Expand Down Expand Up @@ -469,7 +469,7 @@ def smart_segmentation(response: Response, request: Request):
def is_online(response: Response, request: Request):
response = {"is_online": True}
return response

@server.post("/smart_segmentation_batched")
def smart_segmentation_batched(response: Response, request: Request):
response_batch = {}
Expand All @@ -486,7 +486,6 @@ def smart_segmentation_batched(response: Response, request: Request):
return response_batch



model = SegmentAnythingHQModel(
use_gui=True,
custom_inference_settings="./supervisely_integration/serve/custom_settings.yaml",
Expand Down

0 comments on commit dbad8f1

Please sign in to comment.