Spaces:
Sleeping
Sleeping
calculating energy star before
Browse files
app.py
CHANGED
@@ -75,13 +75,13 @@ def get_all_model_names():
|
|
75 |
task_df= task_df.rename(columns={"Link": "model"})
|
76 |
tasks_df = pd.merge(task_df, energy_df, on='model')
|
77 |
tasks_df= tasks_df[['model', 'parameters', 'total_gpu_energy']]
|
|
|
|
|
|
|
78 |
all_df = pd.concat([all_df, tasks_df])
|
79 |
all_df=all_df.drop_duplicates(subset=['model'])
|
80 |
all_df['Parameters'] = all_df['parameters'].apply(format_params)
|
81 |
all_df['Model'] = all_df['model'].apply(make_link)
|
82 |
-
all_df['Total GPU Energy (Wh)'] = all_df['total_gpu_energy']*1000
|
83 |
-
all_df['Total GPU Energy (Wh)'] = all_df['Total GPU Energy (Wh)'].round(2)
|
84 |
-
all_df['Rating'] = pd.cut(all_df['Total GPU Energy (Wh)'], 3, labels=["⭐⭐⭐", "⭐⭐", "⭐"])
|
85 |
all_df= all_df.sort_values('Total GPU Energy (Wh)')
|
86 |
model_names = all_df[['Model','Rating','Total GPU Energy (Wh)', 'Parameters']]
|
87 |
return model_names
|
|
|
75 |
task_df= task_df.rename(columns={"Link": "model"})
|
76 |
tasks_df = pd.merge(task_df, energy_df, on='model')
|
77 |
tasks_df= tasks_df[['model', 'parameters', 'total_gpu_energy']]
|
78 |
+
tasks_df['Total GPU Energy (Wh)'] = tasks_df['total_gpu_energy']*1000
|
79 |
+
tasks_df['Total GPU Energy (Wh)'] = tasks_df['Total GPU Energy (Wh)'].round(2)
|
80 |
+
tasks_df['Rating'] = pd.cut(tasks_df['Total GPU Energy (Wh)'], 3, labels=["⭐⭐⭐", "⭐⭐", "⭐"])
|
81 |
all_df = pd.concat([all_df, tasks_df])
|
82 |
all_df=all_df.drop_duplicates(subset=['model'])
|
83 |
all_df['Parameters'] = all_df['parameters'].apply(format_params)
|
84 |
all_df['Model'] = all_df['model'].apply(make_link)
|
|
|
|
|
|
|
85 |
all_df= all_df.sort_values('Total GPU Energy (Wh)')
|
86 |
model_names = all_df[['Model','Rating','Total GPU Energy (Wh)', 'Parameters']]
|
87 |
return model_names
|