Spaces:
Sleeping
Sleeping
- src/submission/submit.py +4 -4
src/submission/submit.py
CHANGED
@@ -35,16 +35,16 @@ def add_new_eval(
|
|
35 |
if revision_name == "":
|
36 |
revision_name = "main"
|
37 |
|
38 |
-
folder_path = f"{model_name}_{datetime.now()}
|
39 |
file_name = f"pred.json"
|
40 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
41 |
|
42 |
path = f"{EVAL_REQUESTS_PATH}/{version}/{folder_path}/{file_name}"
|
43 |
|
44 |
-
shutil.copy(upload_file, path)
|
45 |
print("Uploading eval file")
|
46 |
API.upload_file(
|
47 |
-
path_or_fileobj=
|
48 |
path_in_repo=path.split("eval-queue/")[1],
|
49 |
repo_id=QUEUE_REPO,
|
50 |
repo_type="dataset",
|
@@ -52,7 +52,7 @@ def add_new_eval(
|
|
52 |
)
|
53 |
|
54 |
# Remove the local file
|
55 |
-
os.remove(path)
|
56 |
|
57 |
|
58 |
# Seems good, creating the eval
|
|
|
35 |
if revision_name == "":
|
36 |
revision_name = "main"
|
37 |
|
38 |
+
folder_path = f"{model_name}_{datetime.now()}"
|
39 |
file_name = f"pred.json"
|
40 |
current_time = datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
|
41 |
|
42 |
path = f"{EVAL_REQUESTS_PATH}/{version}/{folder_path}/{file_name}"
|
43 |
|
44 |
+
# shutil.copy(upload_file, path)
|
45 |
print("Uploading eval file")
|
46 |
API.upload_file(
|
47 |
+
path_or_fileobj=upload_file,
|
48 |
path_in_repo=path.split("eval-queue/")[1],
|
49 |
repo_id=QUEUE_REPO,
|
50 |
repo_type="dataset",
|
|
|
52 |
)
|
53 |
|
54 |
# Remove the local file
|
55 |
+
# os.remove(path)
|
56 |
|
57 |
|
58 |
# Seems good, creating the eval
|