Spaces:
Sleeping
Sleeping
Kesheratmex
commited on
Commit
·
2b356cb
1
Parent(s):
f51c3e3
Enhance Gradio UI: update title, theme, and add custom header with CSS
Browse files- app.py +8 -3
- assets/kesheret.css +69 -0
app.py
CHANGED
|
@@ -711,9 +711,14 @@ def generar_analisis_fuerte(media_path):
|
|
| 711 |
# ────────────────────────────
|
| 712 |
# Interfaz Gradio (extendida)
|
| 713 |
# ────────────────────────────
|
| 714 |
-
with gr.Blocks(
|
| 715 |
-
|
| 716 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 717 |
|
| 718 |
with gr.Row():
|
| 719 |
media_tabs = gr.Tabs()
|
|
|
|
| 711 |
# ────────────────────────────
|
| 712 |
# Interfaz Gradio (extendida)
|
| 713 |
# ────────────────────────────
|
| 714 |
+
with gr.Blocks(
|
| 715 |
+
title="Kesherat · AI Blade Inspection",
|
| 716 |
+
theme=gr.themes.Soft(),
|
| 717 |
+
) as demo:
|
| 718 |
+
gr.HTML("""
|
| 719 |
+
<link rel=\"stylesheet\" href=\"/file=assets/kesheret.css\" />
|
| 720 |
+
<div class=\"kesheret-header\"><h1>🔍 AI Blade Inspection</h1><p>Detección de defectos en palas eólicas con YOLOv8</p></div>
|
| 721 |
+
""")
|
| 722 |
|
| 723 |
with gr.Row():
|
| 724 |
media_tabs = gr.Tabs()
|
assets/kesheret.css
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Kesheret design system CSS */
|
| 2 |
+
:root {
|
| 3 |
+
--kesheret-blue: #0046B8;
|
| 4 |
+
--dark-blue: #031F33;
|
| 5 |
+
--medium-blue: #004D85;
|
| 6 |
+
--light-gray: #D5DDE6;
|
| 7 |
+
--success-green: #00FC96;
|
| 8 |
+
--white: #FFFFFF;
|
| 9 |
+
--light-bg: #F8F9FA;
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 13 |
+
|
| 14 |
+
.gradio-container {
|
| 15 |
+
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
|
| 16 |
+
background: linear-gradient(135deg, var(--light-bg) 0%, #E9ECEF 100%) !important;
|
| 17 |
+
min-height: 100vh;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
.kesheret-header {
|
| 21 |
+
background: linear-gradient(135deg, var(--kesheret-blue) 0%, var(--medium-blue) 100%);
|
| 22 |
+
color: var(--white);
|
| 23 |
+
padding: 2rem 1.5rem;
|
| 24 |
+
border-radius: 0 0 15px 15px;
|
| 25 |
+
margin-bottom: 2rem;
|
| 26 |
+
box-shadow: 0 4px 20px rgba(0, 70, 184, 0.15);
|
| 27 |
+
}
|
| 28 |
+
.kesheret-header h1 {
|
| 29 |
+
font-size: 2.2rem; font-weight: 700; margin: 0; text-align: center;
|
| 30 |
+
text-shadow: 0 2px 4px rgba(0,0,0,.1);
|
| 31 |
+
}
|
| 32 |
+
.kesheret-header p { font-size: 1rem; margin: .5rem 0 0; text-align: center; opacity: .9; }
|
| 33 |
+
|
| 34 |
+
/* Cards/containers */
|
| 35 |
+
.gradio-row, .gradio-column { background: var(--white) !important; border-radius: 12px !important; box-shadow: 0 4px 16px rgba(0,0,0,.08) !important; border: 1px solid rgba(213,221,230,.3) !important; margin: 1rem 0 !important; padding: 1.5rem !important; }
|
| 36 |
+
|
| 37 |
+
/* Tabs */
|
| 38 |
+
.gradio-tabs { background: var(--white) !important; border-radius: 12px !important; overflow: hidden !important; box-shadow: 0 2px 12px rgba(0,0,0,.06) !important; }
|
| 39 |
+
.gradio-tabitem { background: var(--white) !important; border: none !important; padding: 1.5rem !important; }
|
| 40 |
+
|
| 41 |
+
/* Buttons */
|
| 42 |
+
.gradio-button { background: linear-gradient(135deg, var(--kesheret-blue) 0%, var(--medium-blue) 100%) !important; border: none !important; border-radius: 8px !important; color: var(--white) !important; font-weight: 500 !important; padding: .75rem 2rem !important; transition: all .3s ease !important; box-shadow: 0 2px 8px rgba(0,70,184,.2) !important; }
|
| 43 |
+
.gradio-button:hover { background: #0056D6 !important; transform: translateY(-2px) !important; box-shadow: 0 4px 16px rgba(0,70,184,.3) !important; }
|
| 44 |
+
|
| 45 |
+
/* File input */
|
| 46 |
+
.gradio-file { border: 2px dashed var(--medium-blue) !important; border-radius: 12px !important; background: var(--light-bg) !important; padding: 2rem !important; text-align: center !important; }
|
| 47 |
+
.gradio-file:hover { border-color: var(--kesheret-blue) !important; background: rgba(0,70,184,.02) !important; }
|
| 48 |
+
|
| 49 |
+
/* Media outputs */
|
| 50 |
+
.gradio-video, .gradio-image { border-radius: 8px !important; overflow: hidden !important; box-shadow: 0 4px 12px rgba(0,0,0,.1) !important; border: 1px solid var(--light-gray) !important; }
|
| 51 |
+
|
| 52 |
+
/* Textbox */
|
| 53 |
+
.gradio-textbox { border: 1px solid var(--light-gray) !important; border-radius: 8px !important; background: var(--white) !important; padding: 1rem !important; }
|
| 54 |
+
|
| 55 |
+
/* Labels */
|
| 56 |
+
.gradio-label { color: var(--dark-blue) !important; font-weight: 600 !important; font-size: .95rem !important; margin-bottom: .5rem !important; }
|
| 57 |
+
|
| 58 |
+
/* Progress */
|
| 59 |
+
.gradio-progress { background: var(--light-gray) !important; border-radius: 4px !important; }
|
| 60 |
+
.gradio-progress-bar { background: linear-gradient(90deg, var(--kesheret-blue) 0%, var(--success-green) 100%) !important; border-radius: 4px !important; }
|
| 61 |
+
|
| 62 |
+
/* General transitions */
|
| 63 |
+
* { transition: all .2s ease !important; }
|
| 64 |
+
|
| 65 |
+
@media (max-width: 768px) {
|
| 66 |
+
.kesheret-header h1 { font-size: 2rem; }
|
| 67 |
+
.gradio-row, .gradio-column { margin: .5rem 0 !important; padding: 1rem !important; }
|
| 68 |
+
}
|
| 69 |
+
|