abhinav-joshi commited on
Commit
bee5a7d
1 Parent(s): e41abec
Files changed (1) hide show
  1. app.py +49 -49
app.py CHANGED
@@ -27,57 +27,57 @@ def restart_space():
27
 
28
  # Function to load data from a given CSV file
29
  def baseline_load_data(tasks, task_metrics):
30
- # version = version.replace("%", "p")
31
- file_path = f"submissions/baseline/baseline.csv" # Replace with your file paths
32
- df = pd.read_csv(file_path)
33
 
34
  # we only want specific columns and in a specific order
35
 
36
- column_names = [
37
- "Method",
38
- "Submitted By",
39
- "L-NER",
40
- "RR",
41
- "CJPE",
42
- "BAIL",
43
- "LSI",
44
- "PCR",
45
- "SUMM",
46
- "Average",
47
- ]
48
- # Method,Submitted by,L-NER,RR,CJPE,BAIL,LSI,PCR,SUMM,L-MT
49
- column_names = [
50
- "Method",
51
- "Submitted By",
52
- "L-NER",
53
- "RR",
54
- "CJPE",
55
- "BAIL",
56
- "LSI",
57
- "PCR",
58
- "SUMM",
59
- # "Average",
60
- ]
61
-
62
- if tasks is None:
63
- breakpoint()
64
- # based on the tasks, remove the columns that are not needed
65
- if "L-NER" not in tasks:
66
- column_names.remove("L-NER")
67
- if "RR" not in tasks:
68
- column_names.remove("RR")
69
- if "CJPE" not in tasks:
70
- column_names.remove("CJPE")
71
- if "BAIL" not in tasks:
72
- column_names.remove("BAIL")
73
- if "LSI" not in tasks:
74
- column_names.remove("LSI")
75
- if "PCR" not in tasks:
76
- column_names.remove("PCR")
77
- if "SUMM" not in tasks:
78
- column_names.remove("SUMM")
79
-
80
- df = df[column_names]
81
 
82
  import json
83
 
@@ -139,7 +139,7 @@ def baseline_load_data(tasks, task_metrics):
139
  + tasks
140
  + ["Github Link"]
141
  )
142
- print(tasks)
143
  df = df[selected_columns]
144
 
145
  df = df.drop_duplicates(subset=["Method"], keep="first")
 
27
 
28
  # Function to load data from a given CSV file
29
  def baseline_load_data(tasks, task_metrics):
30
+ # # version = version.replace("%", "p")
31
+ # file_path = f"submissions/baseline/baseline.csv" # Replace with your file paths
32
+ # df = pd.read_csv(file_path)
33
 
34
  # we only want specific columns and in a specific order
35
 
36
+ # column_names = [
37
+ # "Method",
38
+ # "Submitted By",
39
+ # "L-NER",
40
+ # "RR",
41
+ # "CJPE",
42
+ # "BAIL",
43
+ # "LSI",
44
+ # "PCR",
45
+ # "SUMM",
46
+ # "Average",
47
+ # ]
48
+ # # Method,Submitted by,L-NER,RR,CJPE,BAIL,LSI,PCR,SUMM,L-MT
49
+ # column_names = [
50
+ # "Method",
51
+ # "Submitted By",
52
+ # "L-NER",
53
+ # "RR",
54
+ # "CJPE",
55
+ # "BAIL",
56
+ # "LSI",
57
+ # "PCR",
58
+ # "SUMM",
59
+ # # "Average",
60
+ # ]
61
+
62
+ # if tasks is None:
63
+ # breakpoint()
64
+ # # based on the tasks, remove the columns that are not needed
65
+ # if "L-NER" not in tasks:
66
+ # column_names.remove("L-NER")
67
+ # if "RR" not in tasks:
68
+ # column_names.remove("RR")
69
+ # if "CJPE" not in tasks:
70
+ # column_names.remove("CJPE")
71
+ # if "BAIL" not in tasks:
72
+ # column_names.remove("BAIL")
73
+ # if "LSI" not in tasks:
74
+ # column_names.remove("LSI")
75
+ # if "PCR" not in tasks:
76
+ # column_names.remove("PCR")
77
+ # if "SUMM" not in tasks:
78
+ # column_names.remove("SUMM")
79
+
80
+ # df = df[column_names]
81
 
82
  import json
83
 
 
139
  + tasks
140
  + ["Github Link"]
141
  )
142
+ # print(tasks)
143
  df = df[selected_columns]
144
 
145
  df = df.drop_duplicates(subset=["Method"], keep="first")