bgamazay commited on
Commit
f76ab84
·
verified ·
1 Parent(s): 4411cf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -7,6 +7,8 @@ def main():
7
  # Sidebar logo and title
8
  st.sidebar.image("logo.png", use_container_width=True) # Display the logo at the top
9
  st.sidebar.title("Label Generator")
 
 
10
 
11
  # Initialize data_df
12
  data_df = None
@@ -30,14 +32,14 @@ def main():
30
 
31
  # Dropdown for selecting a model
32
  st.sidebar.write("### Instructions:")
33
- st.sidebar.write("1. Select a model:")
34
  model_options = data_df["model"].unique().tolist() # Get model options
35
  selected_model = st.sidebar.selectbox(
36
  "Scored Models", model_options, help="Start typing to search for a model"
37
  ) # Searchable dropdown
38
 
39
  # Add step 2 instructions and move the Download button
40
- st.sidebar.write("2. Download the label:")
41
 
42
  # Filter the data for the selected model
43
  model_data = data_df[data_df["model"] == selected_model].iloc[0]
@@ -72,7 +74,7 @@ def main():
72
  img_buffer.seek(0)
73
 
74
  st.sidebar.download_button(
75
- label="Download Label",
76
  data=img_buffer,
77
  file_name="AIEnergyScore.png",
78
  mime="image/png"
@@ -80,7 +82,6 @@ def main():
80
 
81
  # Step 3 instructions
82
  st.sidebar.write("3. Share your label in technical reports, announcements, etc.")
83
- st.sidebar.markdown("[AI Energy Score Leaderboard](https://huggingface.co/spaces/AIEnergyScore/Leaderboard)")
84
 
85
  def create_label(background_image, model_data):
86
  """
 
7
  # Sidebar logo and title
8
  st.sidebar.image("logo.png", use_container_width=True) # Display the logo at the top
9
  st.sidebar.title("Label Generator")
10
+ st.sidebar.markdown("For [AI Energy Score Leaderboard](https://huggingface.co/spaces/AIEnergyScore/Leaderboard)")
11
+
12
 
13
  # Initialize data_df
14
  data_df = None
 
32
 
33
  # Dropdown for selecting a model
34
  st.sidebar.write("### Instructions:")
35
+ st.sidebar.write("1. Select a model below")
36
  model_options = data_df["model"].unique().tolist() # Get model options
37
  selected_model = st.sidebar.selectbox(
38
  "Scored Models", model_options, help="Start typing to search for a model"
39
  ) # Searchable dropdown
40
 
41
  # Add step 2 instructions and move the Download button
42
+ st.sidebar.write("2. Download the label")
43
 
44
  # Filter the data for the selected model
45
  model_data = data_df[data_df["model"] == selected_model].iloc[0]
 
74
  img_buffer.seek(0)
75
 
76
  st.sidebar.download_button(
77
+ label="Download",
78
  data=img_buffer,
79
  file_name="AIEnergyScore.png",
80
  mime="image/png"
 
82
 
83
  # Step 3 instructions
84
  st.sidebar.write("3. Share your label in technical reports, announcements, etc.")
 
85
 
86
  def create_label(background_image, model_data):
87
  """