Spaces:
Runtime error
Runtime error
The same result with numpy
Browse files
server.py
CHANGED
@@ -21,6 +21,7 @@ from threading import Lock
|
|
21 |
|
22 |
import gradio as gr
|
23 |
import pandas as pd
|
|
|
24 |
from huggingface_hub import HfApi, snapshot_download
|
25 |
|
26 |
from compare_significance import SUPPORTED_METRICS
|
@@ -218,16 +219,15 @@ class LeaderboardServer:
|
|
218 |
|
219 |
@staticmethod
|
220 |
def _model_tournament_table_highlight_true_and_false(x):
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
return df_css
|
231 |
|
232 |
def get_model_tournament_table(self, submission_id, category):
|
233 |
if category == self.TASKS_CATEGORY_OVERALL:
|
|
|
21 |
|
22 |
import gradio as gr
|
23 |
import pandas as pd
|
24 |
+
import numpy as np
|
25 |
from huggingface_hub import HfApi, snapshot_download
|
26 |
|
27 |
from compare_significance import SUPPORTED_METRICS
|
|
|
219 |
|
220 |
@staticmethod
|
221 |
def _model_tournament_table_highlight_true_and_false(x):
|
222 |
+
return np.where(
|
223 |
+
x == True,
|
224 |
+
'background-color: rgba(0, 255, 0, 0.1);',
|
225 |
+
np.where(
|
226 |
+
x == False,
|
227 |
+
'background-color: rgba(255, 0, 0, 0.1);',
|
228 |
+
None
|
229 |
+
)
|
230 |
+
)
|
|
|
231 |
|
232 |
def get_model_tournament_table(self, submission_id, category):
|
233 |
if category == self.TASKS_CATEGORY_OVERALL:
|