Spaces:
Runtime error
Runtime error
New TODOs
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def process_submission(*inputs):
|
|
44 |
inputs = dict(zip(SUBMISSION_INPUTS, inputs))
|
45 |
for key in inputs:
|
46 |
if key in ("team_name", "model_name"):
|
47 |
-
inputs[key] = inputs[key].replace("\n", " ").strip()
|
48 |
elif key in ("description", "link_to_model"):
|
49 |
inputs[key] = inputs[key].strip() # TODO: u "link_to_model" kontrola funkčního URL
|
50 |
validate_submission_inputs(**inputs)
|
@@ -212,7 +212,7 @@ with gr.Blocks(theme=gr.themes.Soft(text_size=text_md), css=custom_css) as main:
|
|
212 |
with gr.Tab('Model details'):
|
213 |
gr.Markdown(MORE_DETAILS_MARKDOWN)
|
214 |
detail_dropdown = gr.Dropdown(
|
215 |
-
choices=leaderboard_server.submission_ids,
|
216 |
label="Select model",
|
217 |
interactive=True,
|
218 |
)
|
|
|
44 |
inputs = dict(zip(SUBMISSION_INPUTS, inputs))
|
45 |
for key in inputs:
|
46 |
if key in ("team_name", "model_name"):
|
47 |
+
inputs[key] = inputs[key].replace("\n", " ").strip() # TODO: re.sub(r"""\s+""", " ")
|
48 |
elif key in ("description", "link_to_model"):
|
49 |
inputs[key] = inputs[key].strip() # TODO: u "link_to_model" kontrola funkčního URL
|
50 |
validate_submission_inputs(**inputs)
|
|
|
212 |
with gr.Tab('Model details'):
|
213 |
gr.Markdown(MORE_DETAILS_MARKDOWN)
|
214 |
detail_dropdown = gr.Dropdown(
|
215 |
+
choices=leaderboard_server.submission_ids, # TODO: team_name/model_name
|
216 |
label="Select model",
|
217 |
interactive=True,
|
218 |
)
|
server.py
CHANGED
@@ -110,7 +110,7 @@ class LeaderboardServer:
|
|
110 |
model_link = data["metadata"]["link_to_model"]
|
111 |
model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]
|
112 |
model_title_abbr = self.abbreviate(data["metadata"]["team_name"], 14) + "/" + self.abbreviate(data["metadata"]["model_name"], 14)
|
113 |
-
local_results["model"] = f'<a href="{model_link}" title="{model_title}">{model_title_abbr}</a>'
|
114 |
release = data["metadata"].get("submission_timestamp")
|
115 |
release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
|
116 |
local_results["release"] = release
|
|
|
110 |
model_link = data["metadata"]["link_to_model"]
|
111 |
model_title = data["metadata"]["team_name"] + "/" + data["metadata"]["model_name"]
|
112 |
model_title_abbr = self.abbreviate(data["metadata"]["team_name"], 14) + "/" + self.abbreviate(data["metadata"]["model_name"], 14)
|
113 |
+
local_results["model"] = f'<a href="{model_link}" title="{model_title}">{model_title_abbr}</a>' # TODO: HTML escape
|
114 |
release = data["metadata"].get("submission_timestamp")
|
115 |
release = time.strftime("%Y-%m-%d", time.gmtime(release)) if release else "N/A"
|
116 |
local_results["release"] = release
|