Shiyu Zhao commited on
Commit
c578caa
·
1 Parent(s): 250d539

Update space

Browse files
Files changed (1) hide show
  1. app.py +11 -4
app.py CHANGED
@@ -999,7 +999,7 @@ with gr.Blocks(css=css) as demo:
999
  )
1000
  model_description = gr.Textbox(
1001
  label="Model Description*",
1002
- lines=3,
1003
  placeholder="Briefly describe how your retriever model works..."
1004
  )
1005
 
@@ -1015,7 +1015,10 @@ with gr.Blocks(css=css) as demo:
1015
  )
1016
  with gr.Row():
1017
  # with gr.Column(scale=1): # Small scale for checkbox
1018
- honor_code = gr.Checkbox(label="By submitting these results, you confirm that they are truthful and reproducible, and you verify the integrity of your submission.", value=False)
 
 
 
1019
  # with gr.Column(scale=10): # Much larger scale for text
1020
  # gr.Markdown("")
1021
  csv_file = gr.File(
@@ -1028,8 +1031,12 @@ with gr.Blocks(css=css) as demo:
1028
  placeholder="https://arxiv.org/abs/..."
1029
  )
1030
 
 
 
 
 
1031
 
1032
- submit_btn = gr.Button("Submit", variant="primary", interactive=False)
1033
  result = gr.Textbox(label="Submission Status", interactive=False)
1034
 
1035
  # Set up event handlers
@@ -1039,7 +1046,7 @@ with gr.Blocks(css=css) as demo:
1039
  outputs=all_dfs
1040
  )
1041
  honor_code.change(
1042
- fn=lambda x: gr.Button.update(interactive=x),
1043
  inputs=[honor_code],
1044
  outputs=[submit_btn]
1045
  )
 
999
  )
1000
  model_description = gr.Textbox(
1001
  label="Model Description*",
1002
+ lines=2,
1003
  placeholder="Briefly describe how your retriever model works..."
1004
  )
1005
 
 
1015
  )
1016
  with gr.Row():
1017
  # with gr.Column(scale=1): # Small scale for checkbox
1018
+ honor_code = gr.Checkbox(
1019
+ label="By submitting these results, you confirm that they are truthful and reproducible, and you verify the integrity of your submission.",
1020
+ value=False,
1021
+ elem_id="honor_code_checkbox")
1022
  # with gr.Column(scale=10): # Much larger scale for text
1023
  # gr.Markdown("")
1024
  csv_file = gr.File(
 
1031
  placeholder="https://arxiv.org/abs/..."
1032
  )
1033
 
1034
+ def update_submit_button(honor_checked):
1035
+ """Update submit button state based on honor code checkbox"""
1036
+ return gr.Button.update(interactive=honor_checked)
1037
+
1038
 
1039
+ submit_btn = gr.Button("Submit", variant="primary", interactive=False, elem_id="submit_button")
1040
  result = gr.Textbox(label="Submission Status", interactive=False)
1041
 
1042
  # Set up event handlers
 
1046
  outputs=all_dfs
1047
  )
1048
  honor_code.change(
1049
+ fn=update_submit_button,
1050
  inputs=[honor_code],
1051
  outputs=[submit_btn]
1052
  )