Update app.py
Browse files
app.py
CHANGED
|
@@ -243,8 +243,27 @@ with st.sidebar:
|
|
| 243 |
# Show trending accounts list
|
| 244 |
st.subheader("🔥 Top 30 Trending Accounts")
|
| 245 |
|
| 246 |
-
#
|
| 247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 248 |
# Create a bar chart for top 30 contributors
|
| 249 |
if top_owners:
|
| 250 |
chart_data = pd.DataFrame(top_owners[:30], columns=["Owner", "Spaces Count"])
|
|
|
|
| 243 |
# Show trending accounts list
|
| 244 |
st.subheader("🔥 Top 30 Trending Accounts")
|
| 245 |
|
| 246 |
+
# Display the top 30 accounts list with their scores
|
| 247 |
+
st.markdown("### Trending Contributors Ranking")
|
| 248 |
+
|
| 249 |
+
# Create a data frame for the table
|
| 250 |
+
if top_owners:
|
| 251 |
+
ranking_data = pd.DataFrame(top_owners[:30], columns=["Contributor", "Spaces Count"])
|
| 252 |
+
ranking_data.index = ranking_data.index + 1 # Start index from 1 for ranking
|
| 253 |
+
|
| 254 |
+
# Style the table
|
| 255 |
+
st.dataframe(
|
| 256 |
+
ranking_data,
|
| 257 |
+
column_config={
|
| 258 |
+
"Contributor": st.column_config.TextColumn("Contributor"),
|
| 259 |
+
"Spaces Count": st.column_config.NumberColumn("Spaces Count", format="%d")
|
| 260 |
+
},
|
| 261 |
+
use_container_width=True,
|
| 262 |
+
hide_index=False
|
| 263 |
+
)
|
| 264 |
+
|
| 265 |
+
# Add stats expander with visualization
|
| 266 |
+
with st.expander("View Top 30 Contributor Chart"):
|
| 267 |
# Create a bar chart for top 30 contributors
|
| 268 |
if top_owners:
|
| 269 |
chart_data = pd.DataFrame(top_owners[:30], columns=["Owner", "Spaces Count"])
|