Spaces:
Running
Running
martinigoyanes
commited on
Commit
·
aad4b7d
1
Parent(s):
cdbf151
add validation against backslashes
Browse files- app.py +1 -0
- data_agents_benchmark/leaderboard.py +6 -1
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
|
3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
4 |
from data_agents_benchmark.content import TITLE, INTRODUCTION_TEXT, SUBMISSION_TEXT
|
|
|
1 |
import os
|
2 |
+
import gradio as gr
|
3 |
|
4 |
from apscheduler.schedulers.background import BackgroundScheduler
|
5 |
from data_agents_benchmark.content import TITLE, INTRODUCTION_TEXT, SUBMISSION_TEXT
|
data_agents_benchmark/leaderboard.py
CHANGED
@@ -98,6 +98,11 @@ def process_submission(
|
|
98 |
if model_family == "":
|
99 |
return format_warning("Please provide a model family")
|
100 |
|
|
|
|
|
|
|
|
|
|
|
101 |
# very basic email parsing
|
102 |
_, parsed_mail = parseaddr(mail)
|
103 |
if not "@" in parsed_mail:
|
@@ -116,7 +121,7 @@ def process_submission(
|
|
116 |
if validation_error:
|
117 |
return validation_error
|
118 |
except Exception as exc:
|
119 |
-
return format_error(f"Submission is incorrectly formatted. Please fix it and resubmit your file. {str(exc)}")
|
120 |
|
121 |
|
122 |
print(f"Processing submission_id={organisation}-{agent_name}...")
|
|
|
98 |
if model_family == "":
|
99 |
return format_warning("Please provide a model family")
|
100 |
|
101 |
+
if "/" in agent_name:
|
102 |
+
return format_warning("Not allowed to include / in agent_name")
|
103 |
+
if "/" in organisation:
|
104 |
+
return format_warning("Not allowed to include / in organisation")
|
105 |
+
|
106 |
# very basic email parsing
|
107 |
_, parsed_mail = parseaddr(mail)
|
108 |
if not "@" in parsed_mail:
|
|
|
121 |
if validation_error:
|
122 |
return validation_error
|
123 |
except Exception as exc:
|
124 |
+
return format_error(f"Submission file is incorrectly formatted. Please fix it and resubmit your file. {str(exc)}")
|
125 |
|
126 |
|
127 |
print(f"Processing submission_id={organisation}-{agent_name}...")
|