Spaces:
Runtime error
Runtime error
Commit
·
9a20624
1
Parent(s):
056e156
add update results
Browse files- submissions/baseline/baseline.csv +4 -2
- uploads.py +13 -1
submissions/baseline/baseline.csv
CHANGED
|
@@ -1,3 +1,5 @@
|
|
| 1 |
-
,index,Method,Submitted By,L-NER,RR,CJPE,BAIL,LSI,PCR,SUMM,Average
|
| 2 |
,0,baseline,baseline,0,0,0,0,0,0,0,0
|
| 3 |
-
,0,baseline2,baseline2,0,0,0,0,0,0,0,0
|
|
|
|
|
|
|
|
|
| 1 |
+
Unnamed: 0,index,Method,Submitted By,L-NER,RR,CJPE,BAIL,LSI,PCR,SUMM,Average
|
| 2 |
,0,baseline,baseline,0,0,0,0,0,0,0,0
|
| 3 |
+
,0,baseline2,baseline2,0,0,0,0,0,0,0,0
|
| 4 |
+
,0,baseline,baseline,0,0,0,0,0,0,0,0
|
| 5 |
+
,0,random,random,0,0,0,0,0,0,0,0
|
uploads.py
CHANGED
|
@@ -61,14 +61,18 @@ def add_new_eval(
|
|
| 61 |
|
| 62 |
# load the file
|
| 63 |
df = pd.read_csv(path_to_file)
|
|
|
|
| 64 |
|
| 65 |
# modify the df to include metadata
|
| 66 |
-
df["
|
| 67 |
df["url"] = url
|
| 68 |
df["organisation"] = organisation
|
| 69 |
df["mail"] = parsed_mail
|
| 70 |
df["timestamp"] = datetime.datetime.now()
|
| 71 |
|
|
|
|
|
|
|
|
|
|
| 72 |
# upload to spaces using the hf api at
|
| 73 |
|
| 74 |
path_in_repo = f"submissions/{method_name}"
|
|
@@ -88,6 +92,14 @@ def add_new_eval(
|
|
| 88 |
token=TOKEN,
|
| 89 |
repo_type="dataset",
|
| 90 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
|
| 92 |
return format_log(
|
| 93 |
f"Method {method_name} submitted by {organisation} successfully. \nPlease refresh the leaderboard, and wait a bit to see the score displayed"
|
|
|
|
| 61 |
|
| 62 |
# load the file
|
| 63 |
df = pd.read_csv(path_to_file)
|
| 64 |
+
submission_df = pd.read_csv(path_to_file)
|
| 65 |
|
| 66 |
# modify the df to include metadata
|
| 67 |
+
df["Method"] = method_name
|
| 68 |
df["url"] = url
|
| 69 |
df["organisation"] = organisation
|
| 70 |
df["mail"] = parsed_mail
|
| 71 |
df["timestamp"] = datetime.datetime.now()
|
| 72 |
|
| 73 |
+
submission_df = pd.read_csv(path_to_file)
|
| 74 |
+
submission_df["Method"] = method_name
|
| 75 |
+
submission_df["Submitted By"] = organisation
|
| 76 |
# upload to spaces using the hf api at
|
| 77 |
|
| 78 |
path_in_repo = f"submissions/{method_name}"
|
|
|
|
| 92 |
token=TOKEN,
|
| 93 |
repo_type="dataset",
|
| 94 |
)
|
| 95 |
+
# read the leaderboard
|
| 96 |
+
leaderboard_df = pd.read_csv(f"submissions/baseline/baseline.csv")
|
| 97 |
+
|
| 98 |
+
# append the new submission_df csv to the leaderboard
|
| 99 |
+
leaderboard_df = leaderboard_df.append(submission_df)
|
| 100 |
+
|
| 101 |
+
# save the new leaderboard
|
| 102 |
+
leaderboard_df.to_csv(f"submissions/baseline/baseline.csv", index=False)
|
| 103 |
|
| 104 |
return format_log(
|
| 105 |
f"Method {method_name} submitted by {organisation} successfully. \nPlease refresh the leaderboard, and wait a bit to see the score displayed"
|