Skip to content

Commit

Permalink
fix: honor limit parameter in all cases in run-object-detection CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Dec 28, 2022
1 parent 4420346 commit 4268939
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions robotoff/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,9 @@ def run_object_detection_model(
if not parsed_url.netloc or not parsed_url.scheme:
raise ValueError(f"invalid image URL: {image_url}")

if limit:
image_urls = image_urls[:limit]

else:
with db:
query = (
Expand Down

0 comments on commit 4268939

Please sign in to comment.