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

app update

Browse files
Files changed (1) hide show
  1. app.py +8 -21
app.py CHANGED
@@ -1,32 +1,19 @@
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)
 
1
  import streamlit as st
2
  import pandas as pd
 
 
3
  data = {
4
  'Model': ['code-davinci-edit-001', 'gpt-3.5-turbo', 'code-davinci-002'] ,
5
  '0-shot pass@1': [12.18, 13.43, 6.29],
6
+ '0-shot pass@5': [28.86, 24.62, 19.8],
7
+ '0-shot pass@100': [54.12, 42.14, 45.91],
8
  '1-shot pass@1': [4.73, 16.22, 3.92],
9
  '1-shot pass@5': [12.75, 31.93, 14.34],
10
  '1-shot pass@100': [30.24, 56.93, 40.09],
11
  }
12
 
13
  df = pd.DataFrame(data)
14
+ st.header('NL2Fix Leaderboard')
15
+ #sort data by model name
16
+ data = df.sort_values(by='Model').reset_index(drop=True)
17
+ # st.dataframe(data)
18
+ st.table(data)
19
+ st.metric(label="gpt-3.5-turbo 1-shot pass@100", value="56.93", delta="16.84%")