Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,14 @@ import json
|
|
| 10 |
from envs import API, EVAL_REQUESTS_PATH, TOKEN, QUEUE_REPO
|
| 11 |
|
| 12 |
|
| 13 |
-
def submit(model_name, model_id, challenge, submission_id, architecture, license):
|
| 14 |
|
| 15 |
-
if model_name == "" or model_id == "" or challenge == "" or
|
| 16 |
gr.Error("Please fill all the fields")
|
| 17 |
return
|
|
|
|
|
|
|
|
|
|
| 18 |
try:
|
| 19 |
user_name = ""
|
| 20 |
if "/" in model_id:
|
|
@@ -96,12 +99,15 @@ with gr.Blocks() as demo:
|
|
| 96 |
model_name = gr.Textbox(label="Model name")
|
| 97 |
model_id = gr.Textbox(label="username/space e.g mlsb/alphafold3")
|
| 98 |
challenge = gr.Radio(choices=["PINDER", "PLINDER"],label="Challenge")
|
| 99 |
-
|
|
|
|
|
|
|
|
|
|
| 100 |
architecture = gr.Dropdown(choices=["GNN", "CNN", "Physics-based", "Other"],label="Model architecture")
|
| 101 |
license = gr.Dropdown(choices=["mit", "apache-2.0", "gplv2", "gplv3", "lgpl", "mozilla", "bsd", "other"],label="License")
|
| 102 |
submit_btn = gr.Button("Submit")
|
| 103 |
|
| 104 |
-
submit_btn.click(submit, inputs=[model_name, model_id, challenge, submission_id, architecture, license], outputs=[])
|
| 105 |
|
| 106 |
if __name__ == "__main__":
|
| 107 |
demo.launch()
|
|
|
|
| 10 |
from envs import API, EVAL_REQUESTS_PATH, TOKEN, QUEUE_REPO
|
| 11 |
|
| 12 |
|
| 13 |
+
def submit(model_name, model_id, challenge, submission_id, paper_link, architecture, license):
|
| 14 |
|
| 15 |
+
if model_name == "" or model_id == "" or challenge == "" or architecture == "" or license == "":
|
| 16 |
gr.Error("Please fill all the fields")
|
| 17 |
return
|
| 18 |
+
if submission_id == "" and paper_link =="":
|
| 19 |
+
gr.Error("Provide either a link to a paper describing the method or a submission ID for the MLSB workshop.")
|
| 20 |
+
return
|
| 21 |
try:
|
| 22 |
user_name = ""
|
| 23 |
if "/" in model_id:
|
|
|
|
| 99 |
model_name = gr.Textbox(label="Model name")
|
| 100 |
model_id = gr.Textbox(label="username/space e.g mlsb/alphafold3")
|
| 101 |
challenge = gr.Radio(choices=["PINDER", "PLINDER"],label="Challenge")
|
| 102 |
+
with gr.Row():
|
| 103 |
+
gr.Markdown("Either give a submission id if you submitted to the MLSB workshop or provide a link to the preprint/paper describing the method.")
|
| 104 |
+
submission_id = gr.Textbox(label="Submission ID on CMT")
|
| 105 |
+
paper_link = gr.Textbox(label="Preprint or Paper link")
|
| 106 |
architecture = gr.Dropdown(choices=["GNN", "CNN", "Physics-based", "Other"],label="Model architecture")
|
| 107 |
license = gr.Dropdown(choices=["mit", "apache-2.0", "gplv2", "gplv3", "lgpl", "mozilla", "bsd", "other"],label="License")
|
| 108 |
submit_btn = gr.Button("Submit")
|
| 109 |
|
| 110 |
+
submit_btn.click(submit, inputs=[model_name, model_id, challenge, submission_id, paper_link, architecture, license], outputs=[])
|
| 111 |
|
| 112 |
if __name__ == "__main__":
|
| 113 |
demo.launch()
|