mlabonne commited on
Commit
42af455
1 Parent(s): 2954a60

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -0
app.py CHANGED
@@ -81,6 +81,11 @@ def create_bar_chart(df, category):
81
 
82
  st.plotly_chart(fig, use_container_width=True, height=len(df)*35)
83
 
 
 
 
 
 
84
 
85
  def main():
86
  st.set_page_config(page_title="YALL - Yet Another LLM Leaderboard", layout="wide")
@@ -147,6 +152,14 @@ def main():
147
  hide_index=True,
148
  height=len(df)*37,
149
  )
 
 
 
 
 
 
 
 
150
 
151
  # Full-width plot for the first category
152
  create_bar_chart(df, score_columns[0])
 
81
 
82
  st.plotly_chart(fig, use_container_width=True, height=len(df)*35)
83
 
84
+
85
+ @st.experimental_memo
86
+ def convert_df(df):
87
+ return df.to_csv(index=False).encode('utf-8')
88
+
89
 
90
  def main():
91
  st.set_page_config(page_title="YALL - Yet Another LLM Leaderboard", layout="wide")
 
152
  hide_index=True,
153
  height=len(df)*37,
154
  )
155
+
156
+ st.download_button(
157
+ "Download as csv",
158
+ convert_df(df),
159
+ "file.csv",
160
+ "text/csv",
161
+ key='download-csv'
162
+ )
163
 
164
  # Full-width plot for the first category
165
  create_bar_chart(df, score_columns[0])