Spaces:
Runtime error
Runtime error
removed max annotation number
Browse files
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
|
| 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 |
},
|