Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Clémentine
commited on
Commit
•
9296ad1
1
Parent(s):
9b2e755
fix
Browse files- src/submission/submit.py +6 -3
src/submission/submit.py
CHANGED
@@ -99,7 +99,12 @@ def add_new_eval(
|
|
99 |
tags = []
|
100 |
|
101 |
model_card = ModelCard.load(model)
|
102 |
-
is_merge_from_metadata =
|
|
|
|
|
|
|
|
|
|
|
103 |
merge_keywords = ["mergekit", "merged model", "merge model", "merging"]
|
104 |
# If the model is a merge but not saying it in the metadata, we flag it
|
105 |
is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in merge_keywords)
|
@@ -107,8 +112,6 @@ def add_new_eval(
|
|
107 |
tags.append("merge")
|
108 |
if not is_merge_from_metadata:
|
109 |
tags.append("flagged:undisclosed_merge")
|
110 |
-
if "moe" in model_card.data.tags:
|
111 |
-
tags.append("moe")
|
112 |
|
113 |
|
114 |
# Seems good, creating the eval
|
|
|
99 |
tags = []
|
100 |
|
101 |
model_card = ModelCard.load(model)
|
102 |
+
is_merge_from_metadata = False
|
103 |
+
if model_card.data.tags:
|
104 |
+
is_merge_from_metadata = "merge" in model_card.data.tags
|
105 |
+
if "moe" in model_card.data.tags:
|
106 |
+
tags.append("moe")
|
107 |
+
|
108 |
merge_keywords = ["mergekit", "merged model", "merge model", "merging"]
|
109 |
# If the model is a merge but not saying it in the metadata, we flag it
|
110 |
is_merge_from_model_card = any(keyword in model_card.text.lower() for keyword in merge_keywords)
|
|
|
112 |
tags.append("merge")
|
113 |
if not is_merge_from_metadata:
|
114 |
tags.append("flagged:undisclosed_merge")
|
|
|
|
|
115 |
|
116 |
|
117 |
# Seems good, creating the eval
|