Spaces:
Running
Running
again for mobile
Browse files- .gradio/certificate.pem +31 -0
- app.py +1 -1
- src/learnbee/theme.py +35 -42
- src/learnbee/ui.py +8 -10
.gradio/certificate.pem
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
-----BEGIN CERTIFICATE-----
|
| 2 |
+
MIIFazCCA1OgAwIBAgIRAIIQz7DSQONZRGPgu2OCiwAwDQYJKoZIhvcNAQELBQAw
|
| 3 |
+
TzELMAkGA1UEBhMCVVMxKTAnBgNVBAoTIEludGVybmV0IFNlY3VyaXR5IFJlc2Vh
|
| 4 |
+
cmNoIEdyb3VwMRUwEwYDVQQDEwxJU1JHIFJvb3QgWDEwHhcNMTUwNjA0MTEwNDM4
|
| 5 |
+
WhcNMzUwNjA0MTEwNDM4WjBPMQswCQYDVQQGEwJVUzEpMCcGA1UEChMgSW50ZXJu
|
| 6 |
+
ZXQgU2VjdXJpdHkgUmVzZWFyY2ggR3JvdXAxFTATBgNVBAMTDElTUkcgUm9vdCBY
|
| 7 |
+
MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAK3oJHP0FDfzm54rVygc
|
| 8 |
+
h77ct984kIxuPOZXoHj3dcKi/vVqbvYATyjb3miGbESTtrFj/RQSa78f0uoxmyF+
|
| 9 |
+
0TM8ukj13Xnfs7j/EvEhmkvBioZxaUpmZmyPfjxwv60pIgbz5MDmgK7iS4+3mX6U
|
| 10 |
+
A5/TR5d8mUgjU+g4rk8Kb4Mu0UlXjIB0ttov0DiNewNwIRt18jA8+o+u3dpjq+sW
|
| 11 |
+
T8KOEUt+zwvo/7V3LvSye0rg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+/+sKAIuvtd7u+Nxe5AW0wdeRlN8NwdC
|
| 26 |
+
jNPElpzVmbUq4JUagEiuTDkHzsxHpFKVK7q4+63SM1N95R1NbdWhscdCb+ZAJzVc
|
| 27 |
+
oyi3B43njTOQ5yOf+1CceWxG1bQVs5ZufpsMljq4Ui0/1lvh+wjChP4kqKOJ2qxq
|
| 28 |
+
4RgqsahDYVvTH9w7jXbyLeiNdd8XM2w9U/t7y0Ff/9yi0GE44Za4rF2LN9d11TPA
|
| 29 |
+
mRGunUHBcnWEvgJBQl9nJEiU0Zsnvgc/ubhPgXRR4Xq37Z0j4r7g1SgEEzwxA57d
|
| 30 |
+
emyPxgcYxn/eR44/KJ4EBs+lVDR3veyJm+kXQ99b21/+jh5Xos1AnX5iItreGCc=
|
| 31 |
+
-----END CERTIFICATE-----
|
app.py
CHANGED
|
@@ -16,4 +16,4 @@ if __name__ == "__main__":
|
|
| 16 |
|
| 17 |
# Launch the Gradio app with MCP server enabled.
|
| 18 |
# NOTE: It is required to restart the app when you add or remove MCP tools.
|
| 19 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 16 |
|
| 17 |
# Launch the Gradio app with MCP server enabled.
|
| 18 |
# NOTE: It is required to restart the app when you add or remove MCP tools.
|
| 19 |
+
demo.launch(mcp_server=True,share=True)
|
src/learnbee/theme.py
CHANGED
|
@@ -27,6 +27,18 @@ CUSTOM_CSS = """
|
|
| 27 |
max-width: 1400px !important;
|
| 28 |
margin: 0 auto !important;
|
| 29 |
padding: 1rem !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
}
|
| 31 |
|
| 32 |
/* Beautiful header - siempre visible en ambos modos */
|
|
@@ -636,6 +648,9 @@ label {
|
|
| 636 |
.multilingual-footer {
|
| 637 |
box-sizing: border-box;
|
| 638 |
padding: 0.75rem 1rem;
|
|
|
|
|
|
|
|
|
|
| 639 |
}
|
| 640 |
|
| 641 |
.multilingual-row {
|
|
@@ -644,12 +659,18 @@ label {
|
|
| 644 |
justify-content: center;
|
| 645 |
gap: 0.5rem;
|
| 646 |
flex-wrap: wrap;
|
|
|
|
|
|
|
|
|
|
| 647 |
}
|
| 648 |
|
| 649 |
.multilingual-content {
|
| 650 |
min-width: 0; /* allow flex children to shrink on small screens */
|
| 651 |
flex: 1 1 auto;
|
| 652 |
text-align: left;
|
|
|
|
|
|
|
|
|
|
| 653 |
}
|
| 654 |
|
| 655 |
.multilingual-icon {
|
|
@@ -660,6 +681,14 @@ label {
|
|
| 660 |
.multilingual-reset {
|
| 661 |
font-size: 0.95rem;
|
| 662 |
opacity: 0.95;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 663 |
}
|
| 664 |
|
| 665 |
@media (max-width: 480px) {
|
|
@@ -667,8 +696,9 @@ label {
|
|
| 667 |
flex-direction: column;
|
| 668 |
align-items: center;
|
| 669 |
gap: 0.5rem;
|
|
|
|
| 670 |
}
|
| 671 |
-
.multilingual-content, .multilingual-reset {
|
| 672 |
text-align: center;
|
| 673 |
width: 100%;
|
| 674 |
}
|
|
@@ -676,50 +706,13 @@ label {
|
|
| 676 |
font-size: 1.05rem;
|
| 677 |
}
|
| 678 |
.multilingual-footer {
|
| 679 |
-
padding: 0.6rem 0.
|
|
|
|
|
|
|
|
|
|
| 680 |
}
|
| 681 |
}
|
| 682 |
|
| 683 |
-
/* Defensive rules to prevent horizontal overflow on small/mobile screens */
|
| 684 |
-
html, body {
|
| 685 |
-
max-width: 100%;
|
| 686 |
-
overflow-x: hidden; /* hide tiny overflows while we ensure children can shrink */
|
| 687 |
-
}
|
| 688 |
-
|
| 689 |
-
/* Ensure consistent box-sizing and prevent children from forcing width */
|
| 690 |
-
.gradio-container, .gradio-container * {
|
| 691 |
-
box-sizing: border-box;
|
| 692 |
-
}
|
| 693 |
-
|
| 694 |
-
/* Allow flex children to shrink so rows don't create horizontal scroll */
|
| 695 |
-
.gr-row, .gr-row > div, .multilingual-row, .steps-container, .steps-container > * {
|
| 696 |
-
min-width: 0;
|
| 697 |
-
}
|
| 698 |
-
|
| 699 |
-
/* Make code blocks and long text wrap instead of expanding horizontally */
|
| 700 |
-
.message pre, pre, code {
|
| 701 |
-
white-space: pre-wrap !important;
|
| 702 |
-
word-break: break-word !important;
|
| 703 |
-
overflow-wrap: anywhere !important;
|
| 704 |
-
}
|
| 705 |
-
|
| 706 |
-
/* Images should never overflow their containers */
|
| 707 |
-
img {
|
| 708 |
-
max-width: 100%;
|
| 709 |
-
height: auto;
|
| 710 |
-
}
|
| 711 |
-
|
| 712 |
-
/* Chat container safety */
|
| 713 |
-
.chat-container, .chatbot {
|
| 714 |
-
overflow-wrap: break-word;
|
| 715 |
-
}
|
| 716 |
-
|
| 717 |
-
/* Optional: outline any element causing overflow for debugging (uncomment when needed)
|
| 718 |
-
.overflow-debug {
|
| 719 |
-
outline: 2px solid rgba(255,0,0,0.25);
|
| 720 |
-
}
|
| 721 |
-
*/
|
| 722 |
-
|
| 723 |
/* Footer fine-tuning: center icon + title and unify reset text size */
|
| 724 |
.multilingual-footer .multilingual-icon {
|
| 725 |
font-size: 1.6rem;
|
|
|
|
| 27 |
max-width: 1400px !important;
|
| 28 |
margin: 0 auto !important;
|
| 29 |
padding: 1rem !important;
|
| 30 |
+
overflow-x: hidden !important;
|
| 31 |
+
box-sizing: border-box !important;
|
| 32 |
+
width: 100% !important;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
body, html {
|
| 36 |
+
overflow-x: hidden !important;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* Prevent all children from creating horizontal scroll */
|
| 40 |
+
* {
|
| 41 |
+
box-sizing: border-box;
|
| 42 |
}
|
| 43 |
|
| 44 |
/* Beautiful header - siempre visible en ambos modos */
|
|
|
|
| 648 |
.multilingual-footer {
|
| 649 |
box-sizing: border-box;
|
| 650 |
padding: 0.75rem 1rem;
|
| 651 |
+
overflow-x: hidden !important;
|
| 652 |
+
width: 100%;
|
| 653 |
+
margin: 0 !important;
|
| 654 |
}
|
| 655 |
|
| 656 |
.multilingual-row {
|
|
|
|
| 659 |
justify-content: center;
|
| 660 |
gap: 0.5rem;
|
| 661 |
flex-wrap: wrap;
|
| 662 |
+
max-width: 100%;
|
| 663 |
+
word-break: break-word;
|
| 664 |
+
overflow-wrap: break-word;
|
| 665 |
}
|
| 666 |
|
| 667 |
.multilingual-content {
|
| 668 |
min-width: 0; /* allow flex children to shrink on small screens */
|
| 669 |
flex: 1 1 auto;
|
| 670 |
text-align: left;
|
| 671 |
+
word-break: break-word;
|
| 672 |
+
overflow-wrap: break-word;
|
| 673 |
+
max-width: 100%;
|
| 674 |
}
|
| 675 |
|
| 676 |
.multilingual-icon {
|
|
|
|
| 681 |
.multilingual-reset {
|
| 682 |
font-size: 0.95rem;
|
| 683 |
opacity: 0.95;
|
| 684 |
+
word-break: break-word;
|
| 685 |
+
overflow-wrap: break-word;
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
.multilingual-reset-wrap {
|
| 689 |
+
max-width: 100%;
|
| 690 |
+
word-break: break-word;
|
| 691 |
+
overflow-wrap: break-word;
|
| 692 |
}
|
| 693 |
|
| 694 |
@media (max-width: 480px) {
|
|
|
|
| 696 |
flex-direction: column;
|
| 697 |
align-items: center;
|
| 698 |
gap: 0.5rem;
|
| 699 |
+
padding: 0 0.25rem;
|
| 700 |
}
|
| 701 |
+
.multilingual-content, .multilingual-reset-wrap {
|
| 702 |
text-align: center;
|
| 703 |
width: 100%;
|
| 704 |
}
|
|
|
|
| 706 |
font-size: 1.05rem;
|
| 707 |
}
|
| 708 |
.multilingual-footer {
|
| 709 |
+
padding: 0.6rem 0.5rem;
|
| 710 |
+
}
|
| 711 |
+
.multilingual-desc {
|
| 712 |
+
font-size: 0.9rem;
|
| 713 |
}
|
| 714 |
}
|
| 715 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 716 |
/* Footer fine-tuning: center icon + title and unify reset text size */
|
| 717 |
.multilingual-footer .multilingual-icon {
|
| 718 |
font-size: 1.6rem;
|
src/learnbee/ui.py
CHANGED
|
@@ -334,16 +334,14 @@ def create_gradio_ui():
|
|
| 334 |
# Footer: Multilingual Support (full-width)
|
| 335 |
gr.HTML("""
|
| 336 |
<footer class="multilingual-footer">
|
| 337 |
-
<div>
|
| 338 |
-
<
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
<small class="multilingual-reset">π Use the 'Reset' button to change lesson or tutor during a session.</small>
|
| 346 |
-
</div>
|
| 347 |
</div>
|
| 348 |
</div>
|
| 349 |
</footer>
|
|
|
|
| 334 |
# Footer: Multilingual Support (full-width)
|
| 335 |
gr.HTML("""
|
| 336 |
<footer class="multilingual-footer">
|
| 337 |
+
<div class="multilingual-row">
|
| 338 |
+
<span class="multilingual-icon" aria-hidden="true">π</span>
|
| 339 |
+
<div class="multilingual-content">
|
| 340 |
+
<div class="multilingual-title">Multilingual Support</div>
|
| 341 |
+
<div class="multilingual-desc">The tutor automatically responds in your language. Chat in Spanish, English, French, or any language you prefer.</div>
|
| 342 |
+
</div>
|
| 343 |
+
<div class="multilingual-reset-wrap">
|
| 344 |
+
<small class="multilingual-reset">π Use the 'Reset' button to change lesson or tutor during a session.</small>
|
|
|
|
|
|
|
| 345 |
</div>
|
| 346 |
</div>
|
| 347 |
</footer>
|