AdnanElAssadi commited on
Commit
5c8c0d7
·
verified ·
1 Parent(s): e0f5fc6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -24
app.py CHANGED
@@ -151,16 +151,18 @@ def create_reranking_interface(task_data):
151
  ranking_inputs = []
152
  validation_indicators = []
153
 
154
- # Add back the quick ranking tools with improved styling - more compact layout
155
- with gr.Row(equal_height=True, elem_classes=["tool-row"]):
156
- with gr.Column(scale=2):
157
- gr.Markdown("### Quick Tools:", elem_classes=["tool-heading"])
158
- with gr.Column(scale=2):
159
- sequential_btn = gr.Button("1,2,3...", variant="secondary", size="sm")
160
- with gr.Column(scale=2):
161
- reverse_btn = gr.Button("n,n-1...", variant="secondary", size="sm")
162
- with gr.Column(scale=2):
163
- clear_btn = gr.Button("Clear All", variant="secondary", size="sm")
 
 
164
 
165
  # Make document textboxes much smaller
166
  with gr.Box():
@@ -247,26 +249,26 @@ def create_reranking_interface(task_data):
247
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
248
  }
249
 
250
- .tool-container {
251
- margin-bottom: 10px !important;
252
  background-color: #f8f9fa !important;
253
  border-left: 4px solid #6c757d !important;
254
- padding: 5px !important;
255
- }
256
-
257
- .tool-row {
258
- background-color: #f0f0f0 !important;
259
  border-radius: 5px !important;
260
- padding: 5px !important;
261
- margin-bottom: 10px !important;
262
- align-items: center !important;
263
  }
264
 
265
- .tool-heading {
266
- margin: 0 !important;
267
- padding-top: 5px !important;
268
- font-size: 16px !important;
269
  font-weight: bold !important;
 
 
 
 
 
 
 
 
 
270
  }
271
 
272
  .section-header {
 
151
  ranking_inputs = []
152
  validation_indicators = []
153
 
154
+ # Create a clean header with explanatory labels for quick ranking tools
155
+ gr.Markdown("### Quick Ranking Tools", elem_classes=["tools-header"])
156
+ with gr.Box(elem_classes=["tools-container"]):
157
+ with gr.Row(equal_height=True):
158
+ with gr.Column(scale=4):
159
+ sequential_btn = gr.Button("Rank 1,2,3... (Sequential)", variant="secondary")
160
+ with gr.Column(scale=4):
161
+ reverse_btn = gr.Button("Rank n,n-1... (Reverse)", variant="secondary")
162
+ with gr.Column(scale=3):
163
+ clear_btn = gr.Button("Clear All Rankings", variant="secondary")
164
+ with gr.Row():
165
+ gr.Markdown("<small>Use these buttons to quickly assign rankings to all documents at once.</small>", elem_classes=["tools-help"])
166
 
167
  # Make document textboxes much smaller
168
  with gr.Box():
 
249
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
250
  }
251
 
252
+ .tools-container {
 
253
  background-color: #f8f9fa !important;
254
  border-left: 4px solid #6c757d !important;
255
+ padding: 10px !important;
256
+ margin-bottom: 15px !important;
 
 
 
257
  border-radius: 5px !important;
 
 
 
258
  }
259
 
260
+ .tools-header {
261
+ margin-bottom: 5px !important;
 
 
262
  font-weight: bold !important;
263
+ color: #333 !important;
264
+ border-bottom: 1px solid #ddd !important;
265
+ padding-bottom: 5px !important;
266
+ }
267
+
268
+ .tools-help {
269
+ color: #666 !important;
270
+ margin-top: 5px !important;
271
+ text-align: center !important;
272
  }
273
 
274
  .section-header {