Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -143,13 +143,6 @@ def create_reranking_interface(task_data):
|
|
143 |
elem_classes=["query-text"]
|
144 |
)
|
145 |
|
146 |
-
# Quick ranking tools in a nicely formatted bar
|
147 |
-
with gr.Row(equal_height=True):
|
148 |
-
gr.Markdown("### π Quick Ranking Tools:", elem_classes=["tool-heading"])
|
149 |
-
sequential_btn = gr.Button("Rank in Order (1,2,3...)", elem_classes=["tool-button"])
|
150 |
-
reverse_btn = gr.Button("Reverse Order (n,n-1,...)", elem_classes=["tool-button"])
|
151 |
-
clear_btn = gr.Button("Clear All Rankings", elem_classes=["tool-button"])
|
152 |
-
|
153 |
# Documents section with improved layout
|
154 |
gr.Markdown("## π Documents to Rank")
|
155 |
|
@@ -171,7 +164,8 @@ def create_reranking_interface(task_data):
|
|
171 |
value=doc,
|
172 |
label=f"Document {i+1}",
|
173 |
interactive=False,
|
174 |
-
elem_classes=["document-text"]
|
|
|
175 |
)
|
176 |
doc_containers.append(doc_box)
|
177 |
|
@@ -223,6 +217,9 @@ def create_reranking_interface(task_data):
|
|
223 |
font-size: 16px !important;
|
224 |
line-height: 1.6 !important;
|
225 |
padding: 10px !important;
|
|
|
|
|
|
|
226 |
}
|
227 |
|
228 |
.rank-dropdown select {
|
@@ -542,25 +539,6 @@ def create_reranking_interface(task_data):
|
|
542 |
outputs=[query_text] + doc_containers + ranking_inputs + validation_indicators + [current_sample_id, progress_text, status_box]
|
543 |
)
|
544 |
|
545 |
-
# Connect quick ranking buttons
|
546 |
-
sequential_btn.click(
|
547 |
-
fn=assign_sequential_ranks,
|
548 |
-
inputs=None,
|
549 |
-
outputs=ranking_inputs
|
550 |
-
)
|
551 |
-
|
552 |
-
reverse_btn.click(
|
553 |
-
fn=assign_reverse_ranks,
|
554 |
-
inputs=None,
|
555 |
-
outputs=ranking_inputs
|
556 |
-
)
|
557 |
-
|
558 |
-
clear_btn.click(
|
559 |
-
fn=clear_rankings,
|
560 |
-
inputs=None,
|
561 |
-
outputs=ranking_inputs
|
562 |
-
)
|
563 |
-
|
564 |
# Connect save button
|
565 |
save_btn.click(
|
566 |
fn=save_results,
|
|
|
143 |
elem_classes=["query-text"]
|
144 |
)
|
145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
146 |
# Documents section with improved layout
|
147 |
gr.Markdown("## π Documents to Rank")
|
148 |
|
|
|
164 |
value=doc,
|
165 |
label=f"Document {i+1}",
|
166 |
interactive=False,
|
167 |
+
elem_classes=["document-text"],
|
168 |
+
lines=6, # Increase number of visible lines
|
169 |
)
|
170 |
doc_containers.append(doc_box)
|
171 |
|
|
|
217 |
font-size: 16px !important;
|
218 |
line-height: 1.6 !important;
|
219 |
padding: 10px !important;
|
220 |
+
min-height: 150px !important; /* Ensure minimum height */
|
221 |
+
height: auto !important; /* Allow expansion if needed */
|
222 |
+
overflow-y: visible !important; /* Don't hide overflow */
|
223 |
}
|
224 |
|
225 |
.rank-dropdown select {
|
|
|
539 |
outputs=[query_text] + doc_containers + ranking_inputs + validation_indicators + [current_sample_id, progress_text, status_box]
|
540 |
)
|
541 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
542 |
# Connect save button
|
543 |
save_btn.click(
|
544 |
fn=save_results,
|