AdnanElAssadi commited on
Commit
42ed941
·
verified ·
1 Parent(s): 9f8b4b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -102,11 +102,11 @@ def create_reranking_interface(task_data):
102
  dropdown = gr.Dropdown(
103
  choices=[str(j) for j in range(1, len(samples[0]["candidates"])+1)],
104
  label=f"Rank",
105
- value="",
106
  elem_classes="ranking-dropdown"
107
  )
108
  # Add Quick Rank buttons for fast selection
109
- with gr.Column(scale=1, min_width=120):
110
  gr.Markdown(f"Quick Rank", elem_classes="quick-rank-label")
111
  with gr.Row():
112
  # Add first 5 rank buttons (or fewer if there are fewer candidates)
@@ -597,7 +597,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
597
  """)
598
 
599
  with gr.Row():
600
- with gr.Column(scale=1):
601
  file_input = gr.File(label="Upload a task file (JSON)")
602
  load_btn = gr.Button("Load Task")
603
  message = gr.Textbox(label="Status", interactive=False)
@@ -643,7 +643,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
643
  download_results_btn = gr.Button("Download Results")
644
 
645
  # Right side - will contain the actual interface
646
- with gr.Column(scale=2):
647
  task_container = gr.HTML()
648
 
649
  # Handle file upload and storage
 
102
  dropdown = gr.Dropdown(
103
  choices=[str(j) for j in range(1, len(samples[0]["candidates"])+1)],
104
  label=f"Rank",
105
+ value=None,
106
  elem_classes="ranking-dropdown"
107
  )
108
  # Add Quick Rank buttons for fast selection
109
+ with gr.Column(min_width=120):
110
  gr.Markdown(f"Quick Rank", elem_classes="quick-rank-label")
111
  with gr.Row():
112
  # Add first 5 rank buttons (or fewer if there are fewer candidates)
 
597
  """)
598
 
599
  with gr.Row():
600
+ with gr.Column():
601
  file_input = gr.File(label="Upload a task file (JSON)")
602
  load_btn = gr.Button("Load Task")
603
  message = gr.Textbox(label="Status", interactive=False)
 
643
  download_results_btn = gr.Button("Download Results")
644
 
645
  # Right side - will contain the actual interface
646
+ with gr.Column():
647
  task_container = gr.HTML()
648
 
649
  # Handle file upload and storage