sfakhoury commited on
Commit
c50118a
·
1 Parent(s): d850159

leaderboard

Browse files
Files changed (1) hide show
  1. app.py +32 -0
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import plotly.express as px
4
+
5
+ data = {
6
+ 'Model': ['code-davinci-edit-001', 'gpt-3.5-turbo', 'code-davinci-002'] ,
7
+ '0-shot pass@1': [12.18, 13.43, 6.29],
8
+ '0-shot pass@5': [28.86, 13.43, 19.8],
9
+ '0-shot pass@100': [54.12, 13.43, 45.91],
10
+ '1-shot pass@1': [4.73, 16.22, 3.92],
11
+ '1-shot pass@5': [12.75, 31.93, 14.34],
12
+ '1-shot pass@100': [30.24, 56.93, 40.09],
13
+ }
14
+
15
+ df = pd.DataFrame(data)
16
+
17
+ st.dataframe(df)
18
+
19
+ sb_options = list(df.columns)
20
+ sb_options.remove('Model')
21
+
22
+ colselect1,colselect2 = st.columns(2)
23
+ with colselect1:
24
+ sel_metric = st.selectbox('Metric', options=sb_options)
25
+
26
+ # Create a new dataframe for plotting. Sort it for plotting display.
27
+ # If metric value is the same, display name by alphabetic order.
28
+ df_metric = df.copy()
29
+ df_metric = df_metric.sort_values(by=[sel_metric, 'Name'], ascending=[True, False])
30
+
31
+ plot_assym = px.bar(df_metric, x=sel_metric, y="Name", template="plotly_white", text_auto=True)
32
+ st.plotly_chart(plot_assym)