Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -567,25 +567,35 @@ css_styles = """
|
|
| 567 |
}
|
| 568 |
|
| 569 |
.question-display {
|
| 570 |
-
background: #
|
| 571 |
-
padding:
|
| 572 |
border-radius: 10px;
|
| 573 |
border-left: 5px solid #667eea;
|
| 574 |
margin: 15px 0;
|
| 575 |
-
color: #
|
| 576 |
-
font-size:
|
| 577 |
-
|
|
|
|
| 578 |
overflow-wrap: break-word;
|
| 579 |
}
|
| 580 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 581 |
.feedback-box {
|
| 582 |
-
background: #
|
| 583 |
-
padding:
|
| 584 |
border-radius: 10px;
|
| 585 |
border-left: 5px solid #10b981;
|
| 586 |
-
color: #
|
| 587 |
-
font-size:
|
| 588 |
-
|
|
|
|
| 589 |
overflow-wrap: break-word;
|
| 590 |
}
|
| 591 |
|
|
@@ -595,9 +605,29 @@ css_styles = """
|
|
| 595 |
border-radius: 10px;
|
| 596 |
margin: 20px 0;
|
| 597 |
}
|
| 598 |
-
/*
|
| 599 |
-
@media (max-width:
|
| 600 |
-
.question-display
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 601 |
}
|
| 602 |
"""
|
| 603 |
|
|
@@ -689,10 +719,10 @@ with gr.Blocks(title="UNEB Exam Prep - Primary 6 & 7", theme=gr.themes.Soft(), c
|
|
| 689 |
# Also store subject
|
| 690 |
session.current_subject = subject
|
| 691 |
|
| 692 |
-
# Build accessible HTML list
|
| 693 |
-
items_html = "".join([f"<li>{q.split('.',1)[1].strip() if '.' in q else q}</li>" for q in questions_list])
|
| 694 |
-
html = f"<div><ol style='margin:0 0 0 1.
|
| 695 |
-
return html, questions_list, f" Generated {len(questions_list)} {subject} questions on {topic}"
|
| 696 |
|
| 697 |
generate_btn.click(
|
| 698 |
fn=generate_and_display,
|
|
|
|
| 567 |
}
|
| 568 |
|
| 569 |
.question-display {
|
| 570 |
+
background: #ffffff;
|
| 571 |
+
padding: 25px;
|
| 572 |
border-radius: 10px;
|
| 573 |
border-left: 5px solid #667eea;
|
| 574 |
margin: 15px 0;
|
| 575 |
+
color: #000000 !important;
|
| 576 |
+
font-size: 22px !important;
|
| 577 |
+
font-weight: 700 !important;
|
| 578 |
+
line-height: 1.9 !important;
|
| 579 |
overflow-wrap: break-word;
|
| 580 |
}
|
| 581 |
|
| 582 |
+
.question-display ol, .question-display li {
|
| 583 |
+
color: #000000 !important;
|
| 584 |
+
font-size: 22px !important;
|
| 585 |
+
font-weight: 700 !important;
|
| 586 |
+
line-height: 1.9 !important;
|
| 587 |
+
margin: 14px 0 !important;
|
| 588 |
+
}
|
| 589 |
+
|
| 590 |
.feedback-box {
|
| 591 |
+
background: #ffffff;
|
| 592 |
+
padding: 25px;
|
| 593 |
border-radius: 10px;
|
| 594 |
border-left: 5px solid #10b981;
|
| 595 |
+
color: #000000 !important;
|
| 596 |
+
font-size: 20px !important;
|
| 597 |
+
font-weight: 700 !important;
|
| 598 |
+
line-height: 1.9 !important;
|
| 599 |
overflow-wrap: break-word;
|
| 600 |
}
|
| 601 |
|
|
|
|
| 605 |
border-radius: 10px;
|
| 606 |
margin: 20px 0;
|
| 607 |
}
|
| 608 |
+
/* Significantly larger text for iPad and tablets */
|
| 609 |
+
@media (max-width: 1024px) {
|
| 610 |
+
.question-display {
|
| 611 |
+
font-size: 26px !important;
|
| 612 |
+
padding: 30px !important;
|
| 613 |
+
}
|
| 614 |
+
.question-display ol, .question-display li {
|
| 615 |
+
font-size: 26px !important;
|
| 616 |
+
}
|
| 617 |
+
.feedback-box {
|
| 618 |
+
font-size: 24px !important;
|
| 619 |
+
padding: 30px !important;
|
| 620 |
+
}
|
| 621 |
+
}
|
| 622 |
+
/* Extra large text for small phones */
|
| 623 |
+
@media (max-width: 600px) {
|
| 624 |
+
.question-display {
|
| 625 |
+
font-size: 28px !important;
|
| 626 |
+
padding: 30px !important;
|
| 627 |
+
}
|
| 628 |
+
.question-display ol, .question-display li {
|
| 629 |
+
font-size: 28px !important;
|
| 630 |
+
}
|
| 631 |
}
|
| 632 |
"""
|
| 633 |
|
|
|
|
| 719 |
# Also store subject
|
| 720 |
session.current_subject = subject
|
| 721 |
|
| 722 |
+
# Build accessible HTML list with bold black text for iPad/Safari visibility
|
| 723 |
+
items_html = "".join([f"<li style='color:#000000;font-size:24px;font-weight:bold;margin:16px 0;line-height:2'>{q.split('.',1)[1].strip() if '.' in q else q}</li>" for q in questions_list])
|
| 724 |
+
html = f"<div style='color:#000000;font-size:24px;font-weight:bold;line-height:2'><ol style='margin:0 0 0 1.5rem;padding:0;color:#000000'>{items_html}</ol></div>"
|
| 725 |
+
return html, questions_list, f" ✅ Generated {len(questions_list)} {subject} questions on {topic}"
|
| 726 |
|
| 727 |
generate_btn.click(
|
| 728 |
fn=generate_and_display,
|