Skip to content

Commit

Permalink
Merge pull request #221 from computas/SP24-798-better-categories
Browse files Browse the repository at this point in the history
making labels appear less times
  • Loading branch information
TobiasHermansen-Computas authored Oct 10, 2024
2 parents d215236 + aef1cf5 commit 59b894f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/customvision/classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ def __init__(self) -> None:
puplished_iterations.sort(key=lambda i: i.created)
self.iteration_name = puplished_iterations[-1].publish_name
except Exception as e:
logging.info("An error occurred while trying to get latest published iteration from Custom Vision", e)
logging.info(
"An error occurred while trying to get latest published iteration from Custom Vision",
e,
)
self.iteration_name = "Iteration4"

def predict_image_url(self, img_url: str) -> Dict[str, float]:
Expand Down
2 changes: 1 addition & 1 deletion src/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ def get_n_labels(n, difficulty_id):
difficulty_id - Games.difficulty_id < 2,
)
.order_by(Games.date.desc())
.limit(3)
.limit(5)
.all()
)
labels_to_filter = [
Expand Down

0 comments on commit 59b894f

Please sign in to comment.