Spaces:
Running
Running
Commit
Β·
e31e0cb
1
Parent(s):
445b2d0
Use shutil.copy instead of os.copy for file uploads in task_1.py
Browse files
medvqa/competitions/gi-2025/task_1.py
CHANGED
|
@@ -5,6 +5,7 @@ import argparse
|
|
| 5 |
import os
|
| 6 |
import subprocess as sp
|
| 7 |
import time
|
|
|
|
| 8 |
|
| 9 |
MEDVQA_SUBMIT = True if os.environ.get(
|
| 10 |
'_MEDVQA_SUBMIT_FLAG_', 'FALSE') == 'TRUE' else False
|
|
@@ -65,7 +66,8 @@ else:
|
|
| 65 |
print("π Preparing for submission π")
|
| 66 |
file_path_to_upload = os.path.join(
|
| 67 |
snap_dir, f"{hf_username}_{current_timestamp}_task1.py")
|
| 68 |
-
|
|
|
|
| 69 |
result = client.predict(
|
| 70 |
file=handle_file(file_path_to_upload),
|
| 71 |
api_name="/UploadSubmission"
|
|
|
|
| 5 |
import os
|
| 6 |
import subprocess as sp
|
| 7 |
import time
|
| 8 |
+
import shutil # Add this import
|
| 9 |
|
| 10 |
MEDVQA_SUBMIT = True if os.environ.get(
|
| 11 |
'_MEDVQA_SUBMIT_FLAG_', 'FALSE') == 'TRUE' else False
|
|
|
|
| 66 |
print("π Preparing for submission π")
|
| 67 |
file_path_to_upload = os.path.join(
|
| 68 |
snap_dir, f"{hf_username}_{current_timestamp}_task1.py")
|
| 69 |
+
shutil.copy(os.path.join(snap_dir, file_from_validation),
|
| 70 |
+
file_path_to_upload) # Use shutil.copy here
|
| 71 |
result = client.predict(
|
| 72 |
file=handle_file(file_path_to_upload),
|
| 73 |
api_name="/UploadSubmission"
|