Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -151,16 +151,18 @@ def create_reranking_interface(task_data):
|
|
151 |
ranking_inputs = []
|
152 |
validation_indicators = []
|
153 |
|
154 |
-
#
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
|
|
|
|
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 |
-
.
|
251 |
-
margin-bottom: 10px !important;
|
252 |
background-color: #f8f9fa !important;
|
253 |
border-left: 4px solid #6c757d !important;
|
254 |
-
padding:
|
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 |
-
.
|
266 |
-
margin:
|
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 {
|