Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +10 -15
app/draw_diagram.py
CHANGED
@@ -115,14 +115,7 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
115 |
# st.write("")
|
116 |
st.markdown('##### TABLE')
|
117 |
custom_css = """
|
118 |
-
|
119 |
-
.my-data-table {
|
120 |
-
background-color: #FFFFFF;
|
121 |
-
padding: 10px;
|
122 |
-
border-radius: 5px;
|
123 |
-
# height: 50px;
|
124 |
-
}
|
125 |
-
</style>
|
126 |
"""
|
127 |
st.markdown(custom_css, unsafe_allow_html=True)
|
128 |
|
@@ -139,8 +132,9 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
139 |
except:
|
140 |
# print(f"{model} is not in {dataset_name}")
|
141 |
continue
|
142 |
-
|
143 |
-
|
|
|
144 |
function toggle(source) {
|
145 |
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
|
146 |
for (var i = 0; i < checkboxes.length; i++) {
|
@@ -149,10 +143,11 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
149 |
}
|
150 |
}
|
151 |
</script>"""
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
-
info_body_details = select_function + f"""
|
155 |
-
<div class="my-data-table">
|
156 |
<table style="width:100%">
|
157 |
<thead>
|
158 |
<tr style="text-align: center;">
|
@@ -163,9 +158,9 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
163 |
{s}
|
164 |
</thead>
|
165 |
</table>
|
166 |
-
</div>
|
167 |
"""
|
168 |
-
#
|
|
|
169 |
|
170 |
st.markdown(f"""
|
171 |
<div class="my-data-table">{info_body_details}</div>
|
|
|
115 |
# st.write("")
|
116 |
st.markdown('##### TABLE')
|
117 |
custom_css = """
|
118 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
"""
|
120 |
st.markdown(custom_css, unsafe_allow_html=True)
|
121 |
|
|
|
132 |
except:
|
133 |
# print(f"{model} is not in {dataset_name}")
|
134 |
continue
|
135 |
+
|
136 |
+
# select all function
|
137 |
+
select_all_function = """<script>
|
138 |
function toggle(source) {
|
139 |
var checkboxes = document.querySelectorAll('input[type="checkbox"]');
|
140 |
for (var i = 0; i < checkboxes.length; i++) {
|
|
|
143 |
}
|
144 |
}
|
145 |
</script>"""
|
146 |
+
st.markdown(f"""
|
147 |
+
<div class="select_all">{select_all_function}</div>
|
148 |
+
""", unsafe_allow_html=True)
|
149 |
|
150 |
+
info_body_details = f"""
|
|
|
|
|
151 |
<table style="width:100%">
|
152 |
<thead>
|
153 |
<tr style="text-align: center;">
|
|
|
158 |
{s}
|
159 |
</thead>
|
160 |
</table>
|
|
|
161 |
"""
|
162 |
+
# html_code = custom_css + select_all_function + info_body_details
|
163 |
+
# html(html_code, height = 300)
|
164 |
|
165 |
st.markdown(f"""
|
166 |
<div class="my-data-table">{info_body_details}</div>
|