Corey Morris commited on
Commit
ba99486
1 Parent(s): cf28458

Update app.py and requirements.txt so that it will work with huggingface streamlit with the pandas 1.x version

Browse files
Files changed (2) hide show
  1. app.py +5 -5
  2. requirements.txt +5 -60
app.py CHANGED
@@ -79,17 +79,17 @@ st.dataframe(filtered_data)
79
  df = pd.DataFrame({
80
  'Model': list(filtered_data['Model Name']),
81
  # use debug to troubheshoot error
82
- 'harness|arc:challenge|25': list(filtered_data['harness|arc:challenge|25']),
83
- 'harness|moral_scenarios|5': list(filtered_data['harness|moral_scenarios|5']),
84
  })
85
 
86
  # Calculate color column
87
  df['color'] = 'purple'
88
- df.loc[df['harness|moral_scenarios|5'] < df['harness|arc:challenge|25'], 'color'] = 'red'
89
- df.loc[df['harness|moral_scenarios|5'] > df['harness|arc:challenge|25'], 'color'] = 'blue'
90
 
91
  # Create the scatter plot
92
- fig = px.scatter(df, x='harness|arc:challenge|25', y='harness|moral_scenarios|5', color='color', hover_data=['Model'])
93
  fig.update_layout(showlegend=False, # hide legend
94
  xaxis = dict(autorange="reversed"), # reverse X-axis
95
  yaxis = dict(autorange="reversed")) # reverse Y-axis
 
79
  df = pd.DataFrame({
80
  'Model': list(filtered_data['Model Name']),
81
  # use debug to troubheshoot error
82
+ 'arc:challenge|25': list(filtered_data['arc:challenge|25']),
83
+ 'moral_scenarios|5': list(filtered_data['moral_scenarios|5']),
84
  })
85
 
86
  # Calculate color column
87
  df['color'] = 'purple'
88
+ df.loc[df['moral_scenarios|5'] < df['arc:challenge|25'], 'color'] = 'red'
89
+ df.loc[df['moral_scenarios|5'] > df['arc:challenge|25'], 'color'] = 'blue'
90
 
91
  # Create the scatter plot
92
+ fig = px.scatter(df, x='arc:challenge|25', y='moral_scenarios|5', color='color', hover_data=['Model'])
93
  fig.update_layout(showlegend=False, # hide legend
94
  xaxis = dict(autorange="reversed"), # reverse X-axis
95
  yaxis = dict(autorange="reversed")) # reverse Y-axis
requirements.txt CHANGED
@@ -1,61 +1,6 @@
1
- # pandas~=2.0.2
2
- # streamlit~=1.22.0
3
- # plotly~=5.14.1
4
- streamlit==1.25.0
5
- plotly==5.14.1
6
- pandas==2.0.3
7
- # python~=3.10
8
- # pandas==1.5.3
9
- # streamlit==1.21.0
10
- # plotly==5.14.1
11
 
12
- # # exact versions in my local environment
13
- # altair==4.2.2
14
- # attrs==23.1.0
15
- # blinker==1.6.2
16
- # cachetools==5.3.1
17
- # certifi==2023.7.22
18
- # charset-normalizer==3.2.0
19
- # click==8.1.6
20
- # decorator==5.1.1
21
- # entrypoints==0.4
22
- # gitdb==4.0.10
23
- # GitPython==3.1.32
24
- # idna==3.4
25
- # importlib-metadata==6.8.0
26
- # Jinja2==3.1.2
27
- # jsonschema==4.18.4
28
- # jsonschema-specifications==2023.7.1
29
- # markdown-it-py==3.0.0
30
- # MarkupSafe==2.1.3
31
- # mdurl==0.1.2
32
- # numpy==1.25.1
33
- # packaging==23.1
34
- # pandas==2.0.3
35
- # Pillow==10.0.0
36
- # plotly==5.14.1
37
- # protobuf==3.20.3
38
- # pyarrow==12.0.1
39
- # pydeck==0.8.1b0
40
- # Pygments==2.15.1
41
- # Pympler==1.0.1
42
- # python-dateutil==2.8.2
43
- # pytz==2023.3
44
- # referencing==0.30.0
45
- # requests==2.31.0
46
- # rich==13.4.2
47
- # rpds-py==0.9.2
48
- # six==1.16.0
49
- # smmap==5.0.0
50
- # streamlit==1.22.0
51
- # tenacity==8.2.2
52
- # toml==0.10.2
53
- # toolz==0.12.0
54
- # tornado==6.3.2
55
- # typing_extensions==4.7.1
56
- # tzdata==2023.3
57
- # tzlocal==5.0.1
58
- # urllib3==2.0.4
59
- # validators==0.20.0
60
- # watchdog==3.0.0
61
- # zipp==3.16.2
 
1
+ # replicating the hugging face streamlit and pandas versions
2
+ streamlit==1.21.0
3
+ pandas==1.5.3
 
 
 
 
 
 
 
4
 
5
+ # Other
6
+ plotly==5.14.1