Spaces:
Runtime error
Runtime error
Commit
Β·
a0c6131
1
Parent(s):
44a4b77
wip
Browse files
app.py
CHANGED
|
@@ -139,7 +139,7 @@ with demo:
|
|
| 139 |
|
| 140 |
with gr.Row():
|
| 141 |
with gr.Column():
|
| 142 |
-
submitter_textbox = gr.Textbox(label="Submitter")
|
| 143 |
# revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
| 144 |
# model_type = gr.Dropdown(
|
| 145 |
# choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
|
|
@@ -150,7 +150,7 @@ with demo:
|
|
| 150 |
# )
|
| 151 |
|
| 152 |
# with gr.Column():
|
| 153 |
-
|
| 154 |
# precision = gr.Dropdown(
|
| 155 |
# choices=[i.value.name for i in Precision if i != Precision.Unknown],
|
| 156 |
# label="Precision",
|
|
@@ -170,14 +170,13 @@ with demo:
|
|
| 170 |
logger.info("Submut button")
|
| 171 |
submit_button = gr.Button("Submit")
|
| 172 |
submission_result = gr.Markdown()
|
| 173 |
-
def add_solution_cbk(submitter):
|
| 174 |
-
return add_new_solutions(lbdb, submitter, submission_path
|
| 175 |
submit_button.click(
|
| 176 |
add_solution_cbk,
|
| 177 |
-
# partial(add_new_solutions, lbdb=lbdb, submission_path=None),
|
| 178 |
[
|
| 179 |
submitter_textbox,
|
| 180 |
-
|
| 181 |
],
|
| 182 |
submission_result,
|
| 183 |
)
|
|
|
|
| 139 |
|
| 140 |
with gr.Row():
|
| 141 |
with gr.Column():
|
| 142 |
+
submitter_textbox = gr.Textbox(label="Submitter Name")
|
| 143 |
# revision_name_textbox = gr.Textbox(label="Revision commit", placeholder="main")
|
| 144 |
# model_type = gr.Dropdown(
|
| 145 |
# choices=[t.to_str(" : ") for t in ModelType if t != ModelType.Unknown],
|
|
|
|
| 150 |
# )
|
| 151 |
|
| 152 |
# with gr.Column():
|
| 153 |
+
submission_file = gr.File(label="JSONL solutions file", file_types=[".jsonl"])
|
| 154 |
# precision = gr.Dropdown(
|
| 155 |
# choices=[i.value.name for i in Precision if i != Precision.Unknown],
|
| 156 |
# label="Precision",
|
|
|
|
| 170 |
logger.info("Submut button")
|
| 171 |
submit_button = gr.Button("Submit")
|
| 172 |
submission_result = gr.Markdown()
|
| 173 |
+
def add_solution_cbk(submitter, submission_path):
|
| 174 |
+
return add_new_solutions(lbdb, submitter, submission_path)
|
| 175 |
submit_button.click(
|
| 176 |
add_solution_cbk,
|
|
|
|
| 177 |
[
|
| 178 |
submitter_textbox,
|
| 179 |
+
submission_file,
|
| 180 |
],
|
| 181 |
submission_result,
|
| 182 |
)
|