Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,9 +48,10 @@ try:
|
|
| 48 |
submission_repo = Repository(
|
| 49 |
local_dir="vbench_leaderboard_submission", clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset"
|
| 50 |
)
|
|
|
|
| 51 |
except Exception as e:
|
| 52 |
print(e)
|
| 53 |
-
|
| 54 |
|
| 55 |
all_submissions = [
|
| 56 |
file_name
|
|
@@ -66,7 +67,9 @@ all_results['verified'] = all_results['name'].apply(lambda x: '√' if x in veri
|
|
| 66 |
|
| 67 |
# Write table form CSV
|
| 68 |
table = all_results.copy()
|
| 69 |
-
table = table.round(
|
|
|
|
|
|
|
| 70 |
|
| 71 |
|
| 72 |
|
|
@@ -80,12 +83,18 @@ st.markdown(
|
|
| 80 |
"""
|
| 81 |
)
|
| 82 |
|
|
|
|
| 83 |
sort_option = st.selectbox(
|
| 84 |
'Choose a column to sort by',
|
| 85 |
table.columns[1:-1],
|
|
|
|
| 86 |
)
|
| 87 |
table = table.sort_values(by=sort_option, ascending=False)
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
st.write(style + table.to_markdown(index=False), unsafe_allow_html=True)
|
| 90 |
st.markdown(
|
| 91 |
"""
|
|
|
|
| 48 |
submission_repo = Repository(
|
| 49 |
local_dir="vbench_leaderboard_submission", clone_from=SUBMISSION_URL, use_auth_token=HF_TOKEN, repo_type="dataset"
|
| 50 |
)
|
| 51 |
+
submission_repo.git_pull()
|
| 52 |
except Exception as e:
|
| 53 |
print(e)
|
| 54 |
+
|
| 55 |
|
| 56 |
all_submissions = [
|
| 57 |
file_name
|
|
|
|
| 67 |
|
| 68 |
# Write table form CSV
|
| 69 |
table = all_results.copy()
|
| 70 |
+
table = table.round(4)
|
| 71 |
+
# columns_to_convert = table.columns[1:-1]
|
| 72 |
+
# table[columns_to_convert] = table[columns_to_convert].applymap(lambda x: f'{x * 100}'[:5]+'%')
|
| 73 |
|
| 74 |
|
| 75 |
|
|
|
|
| 83 |
"""
|
| 84 |
)
|
| 85 |
|
| 86 |
+
default_index = list(table.columns[1:-1]).index("overall consistency") if "overall consistency" in table.columns else 0
|
| 87 |
sort_option = st.selectbox(
|
| 88 |
'Choose a column to sort by',
|
| 89 |
table.columns[1:-1],
|
| 90 |
+
index=default_index,
|
| 91 |
)
|
| 92 |
table = table.sort_values(by=sort_option, ascending=False)
|
| 93 |
|
| 94 |
+
table = table.sort_values(by="overall consistency", ascending=False)
|
| 95 |
+
print(table)
|
| 96 |
+
# import ipdb
|
| 97 |
+
# ipdb.set_trace()
|
| 98 |
st.write(style + table.to_markdown(index=False), unsafe_allow_html=True)
|
| 99 |
st.markdown(
|
| 100 |
"""
|