fix: hard limit of likes to soft
#14
by
wseo
- opened
app.py
CHANGED
@@ -24,10 +24,10 @@ CERTIFIED_USERS_FILENAME = "certified.csv"
|
|
24 |
ORGANIZATION = "pseudolab"
|
25 |
|
26 |
START_DATE = datetime(2023, 10, 20, tzinfo=timezone(timedelta(hours=9)))
|
27 |
-
END_DATE = datetime(2023, 11,
|
28 |
|
29 |
|
30 |
-
def has_contributions(repo_type, hf_username, organization, likes=
|
31 |
"""
|
32 |
Check if a user has contributions in the specified repository type.
|
33 |
:param repo_type: A repo type supported by the Hub
|
@@ -74,10 +74,10 @@ def check_if_passed(hf_username):
|
|
74 |
|
75 |
# If the user contributed to models, datasets and spaces then assign excellence
|
76 |
has_models, has_datasets, has_spaces = get_hub_footprint(hf_username, ORGANIZATION)
|
77 |
-
if all(
|
78 |
passed = True
|
79 |
certificate_type = "excellence"
|
80 |
-
elif any(
|
81 |
passed = True
|
82 |
certificate_type = "completion"
|
83 |
|
|
|
24 |
ORGANIZATION = "pseudolab"
|
25 |
|
26 |
START_DATE = datetime(2023, 10, 20, tzinfo=timezone(timedelta(hours=9)))
|
27 |
+
END_DATE = datetime(2023, 11, 10, tzinfo=timezone(timedelta(hours=9)))
|
28 |
|
29 |
|
30 |
+
def has_contributions(repo_type, hf_username, organization, likes=10):
|
31 |
"""
|
32 |
Check if a user has contributions in the specified repository type.
|
33 |
:param repo_type: A repo type supported by the Hub
|
|
|
74 |
|
75 |
# If the user contributed to models, datasets and spaces then assign excellence
|
76 |
has_models, has_datasets, has_spaces = get_hub_footprint(hf_username, ORGANIZATION)
|
77 |
+
if all(has_models, has_datasets, has_spaces):
|
78 |
passed = True
|
79 |
certificate_type = "excellence"
|
80 |
+
elif any(has_models, has_datasets, has_spaces):
|
81 |
passed = True
|
82 |
certificate_type = "completion"
|
83 |
|