Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -382,39 +382,51 @@ def create_ui() -> gr.Blocks:
|
|
382 |
|
383 |
/* Improved dataframe styling for full text display */
|
384 |
.gr-dataframe {
|
385 |
-
|
386 |
-
overflow
|
387 |
-
|
|
|
388 |
}
|
389 |
|
390 |
.gr-dataframe table {
|
391 |
-
table-layout: auto;
|
392 |
width: 100%;
|
393 |
-
|
|
|
394 |
}
|
395 |
|
|
|
396 |
.gr-dataframe th,
|
397 |
.gr-dataframe td {
|
398 |
-
padding: 12px
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
max-height: 200px;
|
403 |
-
overflow-y: auto;
|
404 |
-
white-space: pre-wrap;
|
405 |
line-height: 1.4;
|
406 |
}
|
407 |
|
|
|
408 |
.gr-dataframe th:nth-child(1),
|
409 |
-
.gr-dataframe td:nth-child(1) { width:
|
410 |
.gr-dataframe th:nth-child(2),
|
411 |
-
.gr-dataframe td:nth-child(2) { width:
|
412 |
.gr-dataframe th:nth-child(3),
|
413 |
-
.gr-dataframe td:nth-child(3) { width:
|
414 |
.gr-dataframe th:nth-child(4),
|
415 |
-
.gr-dataframe td:nth-child(4) { width:
|
416 |
.gr-dataframe th:nth-child(5),
|
417 |
-
.gr-dataframe td:nth-child(5) { width:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
418 |
|
419 |
/* Make repository names clickable */
|
420 |
.gr-dataframe td:nth-child(1) {
|
@@ -640,6 +652,7 @@ def create_ui() -> gr.Blocks:
|
|
640 |
gr.Markdown("π― **These are the highest-rated repositories based on your requirements:**")
|
641 |
top_repos_df = gr.Dataframe(
|
642 |
headers=["Repository", "Strengths", "Weaknesses", "Speciality", "Relevance"],
|
|
|
643 |
wrap=True,
|
644 |
interactive=False
|
645 |
)
|
@@ -685,6 +698,7 @@ def create_ui() -> gr.Blocks:
|
|
685 |
gr.Markdown("### π All Analysis Results")
|
686 |
df_output = gr.Dataframe(
|
687 |
headers=["Repository", "Strengths", "Weaknesses", "Speciality", "Relevance"],
|
|
|
688 |
wrap=True,
|
689 |
interactive=False
|
690 |
)
|
|
|
382 |
|
383 |
/* Improved dataframe styling for full text display */
|
384 |
.gr-dataframe {
|
385 |
+
border-radius: 12px;
|
386 |
+
overflow: hidden;
|
387 |
+
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
|
388 |
+
background: rgba(255, 255, 255, 0.98);
|
389 |
}
|
390 |
|
391 |
.gr-dataframe table {
|
|
|
392 |
width: 100%;
|
393 |
+
table-layout: fixed;
|
394 |
+
border-collapse: collapse;
|
395 |
}
|
396 |
|
397 |
+
/* Column width specifications for both dataframes */
|
398 |
.gr-dataframe th,
|
399 |
.gr-dataframe td {
|
400 |
+
padding: 12px 16px;
|
401 |
+
text-align: left;
|
402 |
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
403 |
+
font-size: 0.95rem;
|
|
|
|
|
|
|
404 |
line-height: 1.4;
|
405 |
}
|
406 |
|
407 |
+
/* Specific column widths - applying to both dataframes */
|
408 |
.gr-dataframe th:nth-child(1),
|
409 |
+
.gr-dataframe td:nth-child(1) { width: 16.67% !important; min-width: 16.67% !important; max-width: 16.67% !important; }
|
410 |
.gr-dataframe th:nth-child(2),
|
411 |
+
.gr-dataframe td:nth-child(2) { width: 25% !important; min-width: 25% !important; max-width: 25% !important; }
|
412 |
.gr-dataframe th:nth-child(3),
|
413 |
+
.gr-dataframe td:nth-child(3) { width: 25% !important; min-width: 25% !important; max-width: 25% !important; }
|
414 |
.gr-dataframe th:nth-child(4),
|
415 |
+
.gr-dataframe td:nth-child(4) { width: 20.83% !important; min-width: 20.83% !important; max-width: 20.83% !important; }
|
416 |
.gr-dataframe th:nth-child(5),
|
417 |
+
.gr-dataframe td:nth-child(5) { width: 12.5% !important; min-width: 12.5% !important; max-width: 12.5% !important; }
|
418 |
+
|
419 |
+
/* Additional specific targeting for both dataframes */
|
420 |
+
div[data-testid="dataframe"] table th:nth-child(1),
|
421 |
+
div[data-testid="dataframe"] table td:nth-child(1) { width: 16.67% !important; }
|
422 |
+
div[data-testid="dataframe"] table th:nth-child(2),
|
423 |
+
div[data-testid="dataframe"] table td:nth-child(2) { width: 25% !important; }
|
424 |
+
div[data-testid="dataframe"] table th:nth-child(3),
|
425 |
+
div[data-testid="dataframe"] table td:nth-child(3) { width: 25% !important; }
|
426 |
+
div[data-testid="dataframe"] table th:nth-child(4),
|
427 |
+
div[data-testid="dataframe"] table td:nth-child(4) { width: 20.83% !important; }
|
428 |
+
div[data-testid="dataframe"] table th:nth-child(5),
|
429 |
+
div[data-testid="dataframe"] table td:nth-child(5) { width: 12.5% !important; }
|
430 |
|
431 |
/* Make repository names clickable */
|
432 |
.gr-dataframe td:nth-child(1) {
|
|
|
652 |
gr.Markdown("π― **These are the highest-rated repositories based on your requirements:**")
|
653 |
top_repos_df = gr.Dataframe(
|
654 |
headers=["Repository", "Strengths", "Weaknesses", "Speciality", "Relevance"],
|
655 |
+
column_widths=["16.67%", "25%", "25%", "20.83%", "12.5%"],
|
656 |
wrap=True,
|
657 |
interactive=False
|
658 |
)
|
|
|
698 |
gr.Markdown("### π All Analysis Results")
|
699 |
df_output = gr.Dataframe(
|
700 |
headers=["Repository", "Strengths", "Weaknesses", "Speciality", "Relevance"],
|
701 |
+
column_widths=["16.67%", "25%", "25%", "20.83%", "12.5%"],
|
702 |
wrap=True,
|
703 |
interactive=False
|
704 |
)
|