Upload folder using huggingface_hub
Browse files- app/draw_diagram.py +12 -9
- app/pages.py +2 -2
app/draw_diagram.py
CHANGED
|
@@ -39,10 +39,13 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 39 |
|
| 40 |
st.markdown("""
|
| 41 |
<style>
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
| 46 |
</style>
|
| 47 |
""", unsafe_allow_html=True)
|
| 48 |
|
|
@@ -51,8 +54,8 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 51 |
chart_data['Model'] = chart_data['Model'].map(display_model_names)
|
| 52 |
|
| 53 |
models = st.multiselect("Please choose the model",
|
| 54 |
-
chart_data['Model'].tolist(),
|
| 55 |
-
default = chart_data['Model'].tolist())
|
| 56 |
|
| 57 |
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 58 |
|
|
@@ -125,8 +128,8 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 125 |
s = ''
|
| 126 |
for model in models:
|
| 127 |
try:
|
|
|
|
| 128 |
s += f"""<tr>
|
| 129 |
-
<td align="center"><input type="checkbox" name="select"></td>
|
| 130 |
<td><a href={model_link[model]}>{model}</a></td>
|
| 131 |
<td>{chart_data[chart_data['Model'] == model][new_dataset_name].tolist()[0]}</td>
|
| 132 |
</tr>"""
|
|
@@ -149,10 +152,9 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 149 |
""", unsafe_allow_html=True)
|
| 150 |
|
| 151 |
info_body_details = f"""
|
| 152 |
-
<table style="width:
|
| 153 |
<thead>
|
| 154 |
<tr style="text-align: center;">
|
| 155 |
-
<th style="width:10%"><input type="checkbox" onclick="toggle(this);"></th>
|
| 156 |
<th style="width:45%">MODEL</th>
|
| 157 |
<th style="width:45%">{dataset_name}</th>
|
| 158 |
</tr>
|
|
@@ -160,6 +162,7 @@ def draw(folder_name, category_name, dataset_name, metrics):
|
|
| 160 |
</thead>
|
| 161 |
</table>
|
| 162 |
"""
|
|
|
|
| 163 |
# html_code = custom_css + select_all_function + info_body_details
|
| 164 |
# html(html_code, height = 300)
|
| 165 |
|
|
|
|
| 39 |
|
| 40 |
st.markdown("""
|
| 41 |
<style>
|
| 42 |
+
.stMultiSelect [data-baseweb=select] span {
|
| 43 |
+
max-width: 800px;
|
| 44 |
+
font-size: 0.9rem;
|
| 45 |
+
background-color: #3C6478 !important; /* Background color for selected items */
|
| 46 |
+
color: white; /* Change text color */
|
| 47 |
+
back
|
| 48 |
+
}
|
| 49 |
</style>
|
| 50 |
""", unsafe_allow_html=True)
|
| 51 |
|
|
|
|
| 54 |
chart_data['Model'] = chart_data['Model'].map(display_model_names)
|
| 55 |
|
| 56 |
models = st.multiselect("Please choose the model",
|
| 57 |
+
sorted(chart_data['Model'].tolist()),
|
| 58 |
+
default = sorted(chart_data['Model'].tolist()))
|
| 59 |
|
| 60 |
chart_data = chart_data[chart_data['Model'].isin(models)]
|
| 61 |
|
|
|
|
| 128 |
s = ''
|
| 129 |
for model in models:
|
| 130 |
try:
|
| 131 |
+
# <td align="center"><input type="checkbox" name="select"></td>
|
| 132 |
s += f"""<tr>
|
|
|
|
| 133 |
<td><a href={model_link[model]}>{model}</a></td>
|
| 134 |
<td>{chart_data[chart_data['Model'] == model][new_dataset_name].tolist()[0]}</td>
|
| 135 |
</tr>"""
|
|
|
|
| 152 |
""", unsafe_allow_html=True)
|
| 153 |
|
| 154 |
info_body_details = f"""
|
| 155 |
+
<table style="width:80%">
|
| 156 |
<thead>
|
| 157 |
<tr style="text-align: center;">
|
|
|
|
| 158 |
<th style="width:45%">MODEL</th>
|
| 159 |
<th style="width:45%">{dataset_name}</th>
|
| 160 |
</tr>
|
|
|
|
| 162 |
</thead>
|
| 163 |
</table>
|
| 164 |
"""
|
| 165 |
+
#<th style="width:10%"><input type="checkbox" onclick="toggle(this);"></th>
|
| 166 |
# html_code = custom_css + select_all_function + info_body_details
|
| 167 |
# html(html_code, height = 300)
|
| 168 |
|
app/pages.py
CHANGED
|
@@ -18,10 +18,10 @@ def dataset_contents(dataset, metrics):
|
|
| 18 |
"""
|
| 19 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 20 |
st.markdown(f"""<div class="my-dataset-info">
|
| 21 |
-
<p>
|
| 22 |
</div>""", unsafe_allow_html=True)
|
| 23 |
st.markdown(f"""<div class="my-dataset-info">
|
| 24 |
-
<p>
|
| 25 |
</div>""", unsafe_allow_html=True)
|
| 26 |
|
| 27 |
|
|
|
|
| 18 |
"""
|
| 19 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 20 |
st.markdown(f"""<div class="my-dataset-info">
|
| 21 |
+
<p><b>Dataset Information</b>: {dataset}</p>
|
| 22 |
</div>""", unsafe_allow_html=True)
|
| 23 |
st.markdown(f"""<div class="my-dataset-info">
|
| 24 |
+
<p><b>Metric Information</b>: {metrics}</p>
|
| 25 |
</div>""", unsafe_allow_html=True)
|
| 26 |
|
| 27 |
|