Update app.py
Browse files
app.py
CHANGED
@@ -122,24 +122,25 @@ def main():
|
|
122 |
|
123 |
# Concatenate the DataFrames
|
124 |
if dfs_to_concat:
|
125 |
-
df = pd.concat(
|
126 |
-
dfs_to_concat,
|
127 |
-
column_config={
|
128 |
-
"Likes": st.column_config.NumberColumn(
|
129 |
-
"Likes",
|
130 |
-
help="Number of likes on Hugging Face",
|
131 |
-
format="%d ❤️",
|
132 |
-
),
|
133 |
-
"URL": st.column_config.LinkColumn("App URL"),
|
134 |
-
},
|
135 |
-
hide_index=True,
|
136 |
-
)
|
137 |
|
138 |
# Sort values
|
139 |
df = df.sort_values(by='Average', ascending=False)
|
140 |
|
141 |
# Display the DataFrame
|
142 |
-
st.dataframe(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
# Full-width plot for the first category
|
145 |
create_bar_chart(df, score_columns[0])
|
|
|
122 |
|
123 |
# Concatenate the DataFrames
|
124 |
if dfs_to_concat:
|
125 |
+
df = pd.concat(dfs_to_concat, ignore_index=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
|
127 |
# Sort values
|
128 |
df = df.sort_values(by='Average', ascending=False)
|
129 |
|
130 |
# Display the DataFrame
|
131 |
+
st.dataframe(
|
132 |
+
df[['Model'] + score_columns + ['Likes', 'URL']],
|
133 |
+
use_container_width=True,
|
134 |
+
column_config={
|
135 |
+
"Likes": st.column_config.NumberColumn(
|
136 |
+
"Likes",
|
137 |
+
help="Number of likes on Hugging Face",
|
138 |
+
format="%d ❤️",
|
139 |
+
),
|
140 |
+
"URL": st.column_config.LinkColumn("App URL"),
|
141 |
+
},
|
142 |
+
hide_index=True,
|
143 |
+
)
|
144 |
|
145 |
# Full-width plot for the first category
|
146 |
create_bar_chart(df, score_columns[0])
|