adding hover text
Browse files
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 |
-
|
13 |
-
|
|
|
|
|
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
|