Spaces:
Runtime error
Runtime error
Update dashboard.py
Browse files- views/dashboard.py +16 -15
views/dashboard.py
CHANGED
|
@@ -255,7 +255,7 @@ class Dashboard:
|
|
| 255 |
st.markdown("---")
|
| 256 |
|
| 257 |
with st.container():
|
| 258 |
-
col1, col2, col3
|
| 259 |
|
| 260 |
with col1:
|
| 261 |
with st.container():
|
|
@@ -325,25 +325,26 @@ class Dashboard:
|
|
| 325 |
|
| 326 |
st.altair_chart(chart)
|
| 327 |
|
| 328 |
-
|
| 329 |
-
with st.container():
|
| 330 |
-
st.write(model.titleEvaluationPerformance)
|
| 331 |
|
| 332 |
-
|
|
|
|
| 333 |
|
| 334 |
-
|
| 335 |
-
runs_dict[i] = round(json_data_evaluate[i][0])
|
| 336 |
|
| 337 |
-
|
|
|
|
| 338 |
|
| 339 |
-
|
| 340 |
-
chart = alt.Chart(data).mark_bar().encode(
|
| 341 |
-
x='Value:Q',
|
| 342 |
-
y=alt.Y('Runs:N', sort='-x'),
|
| 343 |
-
color=alt.Color('Runs:N', legend=None)
|
| 344 |
-
)
|
| 345 |
|
| 346 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 347 |
|
| 348 |
|
| 349 |
def calculate_annotation_stats(self, model):
|
|
|
|
| 255 |
st.markdown("---")
|
| 256 |
|
| 257 |
with st.container():
|
| 258 |
+
col1, col2, col3 = st.columns(3)
|
| 259 |
|
| 260 |
with col1:
|
| 261 |
with st.container():
|
|
|
|
| 325 |
|
| 326 |
st.altair_chart(chart)
|
| 327 |
|
| 328 |
+
st.markdown("---")
|
|
|
|
|
|
|
| 329 |
|
| 330 |
+
with st.container():
|
| 331 |
+
st.write(model.titleEvaluationPerformance)
|
| 332 |
|
| 333 |
+
runs_dict = {}
|
|
|
|
| 334 |
|
| 335 |
+
for i in range(0, len(json_data_evaluate)):
|
| 336 |
+
runs_dict[i] = round(json_data_evaluate[i][0])
|
| 337 |
|
| 338 |
+
data = pd.DataFrame({"Runs": runs_dict.keys(), "Value": list(runs_dict.values())})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 339 |
|
| 340 |
+
# Create a horizontal bar chart
|
| 341 |
+
chart = alt.Chart(data).mark_bar().encode(
|
| 342 |
+
x='Value:Q',
|
| 343 |
+
y=alt.Y('Runs:N', sort='-x'),
|
| 344 |
+
color=alt.Color('Runs:N', legend=None)
|
| 345 |
+
)
|
| 346 |
+
|
| 347 |
+
st.altair_chart(chart)
|
| 348 |
|
| 349 |
|
| 350 |
def calculate_annotation_stats(self, model):
|