sasha HF staff commited on
Commit
e5599c2
β€’
1 Parent(s): 2dc39dd

adding hover text

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -9,11 +9,13 @@ def get_plots(task_data):
9
  task_df['Total GPU Energy (Wh)'] = task_df['total_gpu_energy']*1000
10
  task_df = task_df.sort_values(by=['Total GPU Energy (Wh)'])
11
  task_df['energy_star'] = pd.cut(task_df['Total GPU Energy (Wh)'], 3, labels=["⭐⭐⭐", "⭐⭐", "⭐"])
12
- task_df = px.scatter(task_df, x="model", y='Total GPU Energy (Wh)', height= 500, width= 800, color = 'energy_star', color_discrete_map={"⭐": 'red', "⭐⭐": "yellow", "⭐⭐⭐": "green"})
13
- return task_df
 
 
14
 
15
  def get_model_names(task_data):
16
- #TODO: add link to results in model card of each model
17
  task_df= pd.read_csv(task_data)
18
  model_names = task_df[['model']]
19
  return model_names
 
9
  task_df['Total GPU Energy (Wh)'] = task_df['total_gpu_energy']*1000
10
  task_df = task_df.sort_values(by=['Total GPU Energy (Wh)'])
11
  task_df['energy_star'] = pd.cut(task_df['Total GPU Energy (Wh)'], 3, labels=["⭐⭐⭐", "⭐⭐", "⭐"])
12
+ fig = px.scatter(task_df, x="model", y='Total GPU Energy (Wh)', height= 500, width= 800, color = 'energy_star', color_discrete_map={"⭐": 'red', "⭐⭐": "yellow", "⭐⭐⭐": "green"})
13
+ fig.update_traces(mode="markers+lines", hovertemplate=None)
14
+ fig.update_layout(hovermode="y")
15
+ return fig
16
 
17
  def get_model_names(task_data):
18
+ #TODO: add link to results in model card of each model
19
  task_df= pd.read_csv(task_data)
20
  model_names = task_df[['model']]
21
  return model_names