piadonabauer commited on
Commit
bc107af
·
verified ·
1 Parent(s): 0fb31b6

removed max annotation number

Browse files
Files changed (1) hide show
  1. app.py +1 -7
app.py CHANGED
@@ -63,16 +63,10 @@ def download_image(url):
63
 
64
 
65
  def fetch_random_entry(annotator):
66
- """Fetch a random entry from the database that hasn't been rated three times yet."""
67
  pipeline = [
68
- {
69
- "$addFields": {
70
- "ratings_count": {"$size": "$ratings"}
71
- }
72
- },
73
  {
74
  "$match": {
75
- "ratings_count": {"$lt": 5},
76
  "ratings.rater": {"$ne": annotator} # exclude entries where rater is the specified annotator
77
  }
78
  },
 
63
 
64
 
65
  def fetch_random_entry(annotator):
66
+ """Fetch a random entry from the database that hasn't been rated by the specified annotator."""
67
  pipeline = [
 
 
 
 
 
68
  {
69
  "$match": {
 
70
  "ratings.rater": {"$ne": annotator} # exclude entries where rater is the specified annotator
71
  }
72
  },