Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
mrfakename
commited on
Commit
•
99f01ee
1
Parent(s):
331c296
upd
Browse files
app.py
CHANGED
@@ -124,20 +124,24 @@ def downvote_model(model):
|
|
124 |
conn.commit()
|
125 |
cursor.close()
|
126 |
def a_is_better(model1, model2):
|
127 |
-
|
128 |
-
|
|
|
129 |
return reload(model1, model2)
|
130 |
def b_is_better(model1, model2):
|
131 |
-
|
132 |
-
|
|
|
133 |
return reload(model1, model2)
|
134 |
def both_bad(model1, model2):
|
135 |
-
|
136 |
-
|
|
|
137 |
return reload(model1, model2)
|
138 |
def both_good(model1, model2):
|
139 |
-
|
140 |
-
|
|
|
141 |
return reload(model1, model2)
|
142 |
def reload(chosenmodel1=None, chosenmodel2=None):
|
143 |
# Select random splits
|
|
|
124 |
conn.commit()
|
125 |
cursor.close()
|
126 |
def a_is_better(model1, model2):
|
127 |
+
if model1 and model2:
|
128 |
+
upvote_model(model1)
|
129 |
+
downvote_model(model2)
|
130 |
return reload(model1, model2)
|
131 |
def b_is_better(model1, model2):
|
132 |
+
if model1 and model2:
|
133 |
+
upvote_model(model2)
|
134 |
+
downvote_model(model1)
|
135 |
return reload(model1, model2)
|
136 |
def both_bad(model1, model2):
|
137 |
+
if model1 and model2:
|
138 |
+
downvote_model(model1)
|
139 |
+
downvote_model(model2)
|
140 |
return reload(model1, model2)
|
141 |
def both_good(model1, model2):
|
142 |
+
if model1 and model2:
|
143 |
+
upvote_model(model1)
|
144 |
+
upvote_model(model2)
|
145 |
return reload(model1, model2)
|
146 |
def reload(chosenmodel1=None, chosenmodel2=None):
|
147 |
# Select random splits
|