zhuohan-7 commited on
Commit
b2caef0
1 Parent(s): 12f5c7d

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app/draw_diagram.py +3 -3
app/draw_diagram.py CHANGED
@@ -33,9 +33,6 @@ def draw(folder_name, category_name, dataset_name, metrics):
33
  data_path = f'{folder}/{category_name.lower()}.csv'
34
  chart_data = pd.read_csv(data_path).round(2)
35
 
36
- if len(chart_data) == 0:
37
- return
38
-
39
  # if sorted == 'Ascending':
40
  # ascend = True
41
  # else:
@@ -45,6 +42,9 @@ def draw(folder_name, category_name, dataset_name, metrics):
45
  chart_data = chart_data[['Model', dataset_name]]
46
 
47
  chart_data = chart_data.sort_values(by=[dataset_name], ascending=True).dropna(axis=0)
 
 
 
48
 
49
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
50
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)
 
33
  data_path = f'{folder}/{category_name.lower()}.csv'
34
  chart_data = pd.read_csv(data_path).round(2)
35
 
 
 
 
36
  # if sorted == 'Ascending':
37
  # ascend = True
38
  # else:
 
42
  chart_data = chart_data[['Model', dataset_name]]
43
 
44
  chart_data = chart_data.sort_values(by=[dataset_name], ascending=True).dropna(axis=0)
45
+
46
+ if len(chart_data) == 0:
47
+ return
48
 
49
  min_value = round(chart_data.iloc[:, 1::].min().min() - 0.1, 1)
50
  max_value = round(chart_data.iloc[:, 1::].max().max() + 0.1, 1)