Spaces:
Runtime error
Runtime error
| /* ========================= | |
| GLOBAL BACKGROUND (NYC) | |
| ========================= */ | |
| gradio-app, | |
| .gradio-app, | |
| .main, | |
| #app, | |
| [data-testid="app"], | |
| html, | |
| body { | |
| background: url("https://huggingface.co/spaces/teomello/FinalProjectAPP/resolve/main/Z2kAxe.jpg") no-repeat center center fixed ; | |
| background-size: cover ; | |
| min-height: 100vh ; | |
| margin: 0 ; | |
| padding: 0 ; | |
| } | |
| /* Overlay for readability */ | |
| gradio-app::before, | |
| .gradio-app::before, | |
| .main::before, | |
| #app::before, | |
| [data-testid="app"]::before { | |
| content: "" ; | |
| position: fixed ; | |
| inset: 0 ; | |
| background: rgba(0, 0, 0, 0.30) ; | |
| pointer-events: none ; | |
| z-index: 0 ; | |
| } | |
| /* Remove any previous bottom banner */ | |
| body::after { | |
| content: none ; | |
| } | |
| /* ========================= | |
| MAIN CONTAINER | |
| ========================= */ | |
| .gradio-container { | |
| position: relative ; | |
| z-index: 1 ; | |
| max-width: 1400px ; | |
| width: 94vw ; | |
| margin: 0 auto ; | |
| padding-top: 180px ; | |
| padding-bottom: 120px ; | |
| background: transparent ; | |
| } | |
| /* ========================= | |
| TITLE / HERO | |
| ========================= */ | |
| /* Optional: add a dark panel behind title/subtitle for readability */ | |
| #escp_title { | |
| background: rgba(0, 0, 0, 0.45) ; | |
| padding: 20px ; | |
| border-radius: 12px ; | |
| max-width: 1100px ; | |
| margin: 0 auto 18px auto ; | |
| } | |
| #escp_title h1 { | |
| color: rgb(242,198,55) ; | |
| font-size: 3rem ; | |
| font-weight: 800 ; | |
| text-align: center ; | |
| margin: 0 0 12px 0 ; | |
| } | |
| /* Subtitle more visible */ | |
| #escp_title p, | |
| #escp_title em { | |
| color: rgba(255,255,255,0.98) ; | |
| font-size: 1.1rem ; | |
| font-weight: 500 ; | |
| text-align: center ; | |
| max-width: 900px ; | |
| margin: 0 auto 6px auto ; | |
| line-height: 1.5 ; | |
| } | |
| /* ========================= | |
| TABS | |
| ========================= */ | |
| .tabs > .tab-nav, | |
| .tab-nav, | |
| div[role="tablist"], | |
| .svelte-tabs > .tab-nav { | |
| background: rgba(0, 0, 0, 0.45) ; | |
| border-radius: 10px 10px 0 0 ; | |
| padding: 4px ; | |
| } | |
| /* ALL tab buttons */ | |
| .tabs > .tab-nav button, | |
| .tab-nav button, | |
| div[role="tablist"] button, | |
| button[role="tab"], | |
| .svelte-tabs button, | |
| .tab-nav > button, | |
| .tabs button { | |
| color: #ffffff ; | |
| font-weight: 600 ; | |
| border: none ; | |
| background: transparent ; | |
| padding: 10px 20px ; | |
| border-radius: 8px 8px 0 0 ; | |
| opacity: 1 ; | |
| } | |
| /* Selected tab */ | |
| .tabs > .tab-nav button.selected, | |
| .tab-nav button.selected, | |
| button[role="tab"][aria-selected="true"], | |
| button[role="tab"].selected, | |
| div[role="tablist"] button[aria-selected="true"], | |
| .svelte-tabs button.selected { | |
| color: rgb(242, 198, 55) ; | |
| background: rgba(255, 255, 255, 0.15) ; | |
| } | |
| /* Unselected tabs visibility */ | |
| .tabs > .tab-nav button:not(.selected), | |
| .tab-nav button:not(.selected), | |
| button[role="tab"][aria-selected="false"], | |
| button[role="tab"]:not(.selected), | |
| div[role="tablist"] button:not([aria-selected="true"]) { | |
| color: #ffffff ; | |
| opacity: 1 ; | |
| } | |
| /* ========================= | |
| PANELS / CARDS | |
| ========================= */ | |
| .gradio-container .gr-block, | |
| .gradio-container .gr-box, | |
| .gradio-container .gr-panel, | |
| .gradio-container .gr-group { | |
| background: rgba(255, 255, 255, 0.96) ; | |
| border-radius: 12px ; | |
| } | |
| /* Tab content */ | |
| .tabitem { | |
| background: rgba(255, 255, 255, 0.95) ; | |
| border-radius: 0 0 12px 12px ; | |
| padding: 16px ; | |
| } | |
| /* ========================= | |
| INPUTS | |
| ========================= */ | |
| .gradio-container input, | |
| .gradio-container textarea, | |
| .gradio-container select { | |
| background: #ffffff ; | |
| border: 1px solid #d1d5db ; | |
| border-radius: 8px ; | |
| } | |
| /* ========================= | |
| EXECUTION LOG (terminal style) | |
| Force black background + white text | |
| ========================= */ | |
| /* Execution log: terminal dark style — scope to run_log only. | |
| The Gradio Textbox with lines>=10 gets a [data-testid="textbox"] container. | |
| We target it by excluding the AI chat input. */ | |
| .gradio-container [data-testid="textbox"]:not(#ai_chat_input) textarea, | |
| .gradio-container .gr-textbox:not(#ai_chat_input) textarea { | |
| background-color: #111111 ; | |
| color: #eaeaea ; | |
| font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace ; | |
| font-size: 0.85rem ; | |
| border-radius: 10px ; | |
| padding: 12px ; | |
| border: 1px solid rgba(255,255,255,0.18) ; | |
| } | |
| .gradio-container [data-testid="textbox"]:not(#ai_chat_input) textarea::placeholder { | |
| color: rgba(255,255,255,0.55) ; | |
| } | |
| /* AI chat input: clean white box */ | |
| #ai_chat_input textarea { | |
| background-color: #ffffff ; | |
| color: #111111 ; | |
| font-family: inherit ; | |
| font-size: 0.95rem ; | |
| border-radius: 8px ; | |
| padding: 10px 12px ; | |
| border: 1px solid #d1d5db ; | |
| } | |
| #ai_chat_input textarea::placeholder { | |
| color: #9ca3af ; | |
| } | |
| /* ========================= | |
| BUTTONS | |
| ========================= */ | |
| /* Only style "real" action buttons, not icon toolbar buttons or thumbnails */ | |
| .gradio-container button:not([role="tab"]):not(.icon-button):not(.thumbnail-item):not([class*="thumbnail"]) { | |
| font-weight: 600 ; | |
| padding: 10px 16px ; | |
| border-radius: 10px ; | |
| } | |
| button.primary { | |
| background-color: rgb(40, 9, 109) ; | |
| color: #ffffff ; | |
| border: none ; | |
| } | |
| button.primary:hover { | |
| background-color: rgb(60, 20, 140) ; | |
| } | |
| button.secondary { | |
| background-color: #ffffff ; | |
| color: rgb(40, 9, 109) ; | |
| border: 2px solid rgb(40, 9, 109) ; | |
| } | |
| button.secondary:hover { | |
| background-color: rgb(240, 238, 250) ; | |
| } | |
| /* ========================= | |
| DATAFRAMES / TABLES | |
| ========================= */ | |
| [data-testid="dataframe"] { | |
| background-color: #ffffff ; | |
| border-radius: 10px ; | |
| } | |
| table { | |
| font-size: 0.85rem ; | |
| } | |
| /* ========================= | |
| CHATBOT (AI Dashboard) | |
| ========================= */ | |
| .gr-chatbot { | |
| min-height: 380px ; | |
| background-color: #ffffff ; | |
| border-radius: 12px ; | |
| } | |
| .gr-chatbot .message.user { | |
| background-color: rgb(232, 225, 250) ; | |
| border-radius: 12px ; | |
| } | |
| .gr-chatbot .message.bot { | |
| background-color: #f3f4f6 ; | |
| border-radius: 12px ; | |
| } | |
| /* ========================= | |
| GALLERY | |
| ========================= */ | |
| .gallery { | |
| background: #ffffff ; | |
| border-radius: 10px ; | |
| } | |
| /* ========================= | |
| MARKDOWN HEADINGS | |
| ========================= */ | |
| .tabitem h3 { | |
| color: rgb(40, 9, 109) ; | |
| font-weight: 700 ; | |
| } | |
| .tabitem h4 { | |
| color: #374151 ; | |
| } | |
| /* ========================= | |
| EXAMPLES ROW (AI Dashboard) | |
| ========================= */ | |
| .examples-row button { | |
| background: rgb(240, 238, 250) ; | |
| color: rgb(40, 9, 109) ; | |
| border: 1px solid rgb(40, 9, 109) ; | |
| border-radius: 8px ; | |
| font-size: 0.85rem ; | |
| } | |
| .examples-row button:hover { | |
| background: rgb(232, 225, 250) ; | |
| } | |
| /* ========================= | |
| HEADER / FOOTER CLEANUP | |
| ========================= */ | |
| header, | |
| footer, | |
| header *, | |
| footer * { | |
| background: transparent ; | |
| box-shadow: none ; | |
| } | |
| /* Hover state */ | |
| .gradio-container .gr-modal button:hover, | |
| .gradio-container .gallery button:hover { | |
| background: rgb(240, 238, 250) ; | |
| } | |
| /* ========================= | |
| FIX: Image viewer icon-button toolbar (Download/Fullscreen/Share/Close) | |
| These use SVG with fill/stroke="currentColor", so we must set a visible color. | |
| Targets .icon-button class directly — works for gr.Image AND gallery lightbox. | |
| ========================= */ | |
| .gradio-container button.icon-button, | |
| .gradio-container .icon-button, | |
| button.icon-button, | |
| .icon-button { | |
| color: #374151 ; /* dark gray — visible on white bg */ | |
| background: rgba(255,255,255,0.90) ; | |
| border-radius: 8px ; | |
| padding: 4px ; /* keep compact — these are icon-only buttons */ | |
| } | |
| .gradio-container button.icon-button:hover, | |
| .gradio-container .icon-button:hover, | |
| button.icon-button:hover, | |
| .icon-button:hover { | |
| background: rgba(232, 225, 250, 0.95) ; | |
| color: rgb(40, 9, 109) ; | |
| } | |
| /* Ensure SVGs inside icon-buttons inherit the visible color */ | |
| .gradio-container button.icon-button svg, | |
| .gradio-container .icon-button svg, | |
| button.icon-button svg, | |
| .icon-button svg { | |
| color: inherit ; | |
| stroke: currentColor; | |
| } | |
| /* Also cover any toolbar buttons wrapped in [role=dialog] (older Gradio) */ | |
| .gradio-container [role="dialog"] button[aria-label]:not(.icon-button), | |
| .gradio-container [role="dialog"] button[title]:not(.icon-button) { | |
| background: rgba(255,255,255,0.95) ; | |
| border: 1px solid rgba(40, 9, 109, 0.40) ; | |
| border-radius: 10px ; | |
| color: rgb(40, 9, 109) ; | |
| } | |
| .gradio-container [role="dialog"] button[aria-label]:not(.icon-button) svg, | |
| .gradio-container [role="dialog"] button[title]:not(.icon-button) svg { | |
| color: rgb(40, 9, 109) ; | |
| } | |
| /* ========================= | |
| FIX: Gallery bottom strip — thumbnail-item buttons | |
| ========================= */ | |
| .gradio-container button.thumbnail-item, | |
| .gradio-container [class*="thumbnail-item"] { | |
| background: transparent ; | |
| border: 2px solid transparent ; | |
| border-radius: 6px ; | |
| padding: 2px ; /* remove the 10px 16px from the general rule */ | |
| overflow: hidden ; | |
| min-width: 52px ; | |
| min-height: 52px ; | |
| } | |
| .gradio-container button.thumbnail-item.selected, | |
| .gradio-container [class*="thumbnail-item"].selected { | |
| border-color: rgb(40, 9, 109) ; | |
| } | |
| .gradio-container button.thumbnail-item img, | |
| .gradio-container [class*="thumbnail-item"] img { | |
| display: block ; | |
| width: 100% ; | |
| height: 100% ; | |
| object-fit: cover ; | |
| opacity: 1 ; | |
| visibility: visible ; | |
| filter: none ; | |
| } | |
| /* ========================= | |
| FIX: Gallery grid thumbnails | |
| ========================= */ | |
| .gradio-container .gallery, | |
| .gradio-container [data-testid="gallery"] { | |
| background: #ffffff ; | |
| } | |
| .gradio-container .gallery button:not(.icon-button):not(.thumbnail-item), | |
| .gradio-container [data-testid="gallery"] button:not(.icon-button):not(.thumbnail-item) { | |
| background: transparent ; | |
| overflow: hidden ; | |
| min-width: 56px ; | |
| min-height: 56px ; | |
| padding: 0 ; | |
| } | |
| .gradio-container .gallery img, | |
| .gradio-container [data-testid="gallery"] img { | |
| display: block ; | |
| opacity: 1 ; | |
| visibility: visible ; | |
| filter: none ; | |
| mix-blend-mode: normal ; | |
| width: 100% ; | |
| height: 100% ; | |
| object-fit: cover ; | |
| } | |
| .gradio-container .gallery canvas, | |
| .gradio-container [data-testid="gallery"] canvas { | |
| display: block ; | |
| opacity: 1 ; | |
| visibility: visible ; | |
| filter: none ; | |
| width: 100% ; | |
| height: 100% ; | |
| } | |