Update app.py
Browse files
app.py
CHANGED
@@ -30,13 +30,14 @@ leaderboard = pn.pane.DataFrame(pd.DataFrame(), width=600)
|
|
30 |
import tempfile
|
31 |
|
32 |
temp_dir = tempfile.gettempdir()
|
33 |
-
|
34 |
def submit_file(event):
|
35 |
if file_input.value is None:
|
36 |
status.object = "⚠️ Please upload a .zip file before submitting."
|
37 |
return
|
38 |
|
39 |
try:
|
|
|
40 |
drive_file_id = upload_to_drive(submission_path, filename)
|
41 |
status.object = f"✅ Uploaded to Google Drive [File ID: {drive_file_id}]"
|
42 |
except Exception as e:
|
|
|
30 |
import tempfile
|
31 |
|
32 |
temp_dir = tempfile.gettempdir()
|
33 |
+
|
34 |
def submit_file(event):
|
35 |
if file_input.value is None:
|
36 |
status.object = "⚠️ Please upload a .zip file before submitting."
|
37 |
return
|
38 |
|
39 |
try:
|
40 |
+
submission_path = os.path.join(temp_dir, filename)
|
41 |
drive_file_id = upload_to_drive(submission_path, filename)
|
42 |
status.object = f"✅ Uploaded to Google Drive [File ID: {drive_file_id}]"
|
43 |
except Exception as e:
|