Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
f477fda
1
Parent(s):
aabfa13
forcing login for submission
Browse files- app.py +3 -1
- dabstep_benchmark/leaderboard.py +2 -1
app.py
CHANGED
|
@@ -64,7 +64,9 @@ if __name__ == "__main__":
|
|
| 64 |
label="Contact email (will be stored privately, & used if there is an issue with your submission)")
|
| 65 |
file_output = gr.File()
|
| 66 |
|
| 67 |
-
|
|
|
|
|
|
|
| 68 |
submission_result = gr.Markdown()
|
| 69 |
submit_button.click(
|
| 70 |
process_submission,
|
|
|
|
| 64 |
label="Contact email (will be stored privately, & used if there is an issue with your submission)")
|
| 65 |
file_output = gr.File()
|
| 66 |
|
| 67 |
+
with gr.Row():
|
| 68 |
+
gr.LoginButton()
|
| 69 |
+
submit_button = gr.Button("Submit answers")
|
| 70 |
submission_result = gr.Markdown()
|
| 71 |
submit_button.click(
|
| 72 |
process_submission,
|
dabstep_benchmark/leaderboard.py
CHANGED
|
@@ -92,6 +92,7 @@ def process_submission(
|
|
| 92 |
path_to_file: str,
|
| 93 |
organisation: str,
|
| 94 |
mail: str,
|
|
|
|
| 95 |
):
|
| 96 |
if agent_name == "":
|
| 97 |
return format_warning("Please provide an agent name")
|
|
@@ -150,7 +151,7 @@ def process_submission(
|
|
| 150 |
submission_df["submission_id"] = submission_id
|
| 151 |
submission_df["agent_name"] = agent_name
|
| 152 |
submission_df["model_family"] = model_family
|
| 153 |
-
submission_df["organisation"] = organisation
|
| 154 |
submission_df["repo_url"] = repo_url
|
| 155 |
submission_df["date"] = datetime.date.today().strftime("%d-%m-%Y")
|
| 156 |
|
|
|
|
| 92 |
path_to_file: str,
|
| 93 |
organisation: str,
|
| 94 |
mail: str,
|
| 95 |
+
profile: gr.OAuthProfile,
|
| 96 |
):
|
| 97 |
if agent_name == "":
|
| 98 |
return format_warning("Please provide an agent name")
|
|
|
|
| 151 |
submission_df["submission_id"] = submission_id
|
| 152 |
submission_df["agent_name"] = agent_name
|
| 153 |
submission_df["model_family"] = model_family
|
| 154 |
+
submission_df["organisation"] = f"{organisation} | user {profile.username}"
|
| 155 |
submission_df["repo_url"] = repo_url
|
| 156 |
submission_df["date"] = datetime.date.today().strftime("%d-%m-%Y")
|
| 157 |
|