dcavadia commited on
Commit
bc42ebc
Β·
1 Parent(s): f1f5de1

update gradio style

Browse files
Files changed (1) hide show
  1. src/ui/styles.py +51 -101
src/ui/styles.py CHANGED
@@ -21,35 +21,6 @@ def get_custom_css() -> str:
21
  .gradio-container { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
22
  .gr-button { transition: all 0.2s ease; }
23
  .gr-button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
24
-
25
- /* Professional header styling */
26
- .project-header {
27
- background: linear-gradient(135deg, #f8fafc, #f1f5f9);
28
- padding: 20px;
29
- border-radius: 12px;
30
- border-left: 4px solid #e11d48;
31
- margin-bottom: 20px;
32
- }
33
- .research-badge {
34
- display: inline-block;
35
- background: #dcfce7;
36
- color: #166534;
37
- padding: 4px 12px;
38
- border-radius: 20px;
39
- font-size: 12px;
40
- font-weight: 600;
41
- margin-left: 12px;
42
- }
43
- .demo-badge {
44
- display: inline-block;
45
- background: #fef3c7;
46
- color: #92400e;
47
- padding: 4px 12px;
48
- border-radius: 20px;
49
- font-size: 12px;
50
- font-weight: 600;
51
- margin-left: 8px;
52
- }
53
  """
54
 
55
  def create_theme():
@@ -67,42 +38,35 @@ def create_theme():
67
  def get_header_html() -> str:
68
  """Get HTML for application header."""
69
  return """
70
- <div class="project-header">
71
- <h1 style="margin: 0; color: #1e293b; font-size: 28px;">
72
- πŸ”¬ MelanoScope AI
73
- <span class="research-badge">UCV Thesis Research</span>
74
- <span class="demo-badge">Production Ready</span>
75
- </h1>
76
-
77
- <h2 style="margin: 12px 0 8px 0; color: #475569; font-size: 18px; font-weight: 500;">
78
- NFNet-L0 Convolutional Neural Network for Dermatoscopic Image Classification
79
- </h2>
80
-
81
- <p style="margin: 16px 0; color: #64748b; font-size: 14px; line-height: 1.6;">
82
- <strong>πŸŽ“ Institution:</strong> Universidad Central de Venezuela &nbsp;β€’&nbsp;
83
- <strong>🧠 Architecture:</strong> NFNet-L0 + Weight Standardization &nbsp;β€’&nbsp;
84
- <strong>🎯 Validation Accuracy:</strong> 96.17% (0.961718) &nbsp;β€’&nbsp;
85
- <strong>⚑ Optimization:</strong> ONNX Runtime Deployment
86
- </p>
87
-
88
- <p style="margin: 16px 0; color: #64748b; font-size: 14px; line-height: 1.6;">
89
- <strong>πŸ“Š F1-Score:</strong> 0.96 &nbsp;β€’&nbsp;
90
- <strong>πŸ” Specificity:</strong> 1.0 (Perfect) &nbsp;β€’&nbsp;
91
- <strong>πŸ’Ύ Model Size:</strong> 24.1M parameters &nbsp;β€’&nbsp;
92
- <strong>πŸš€ Inference:</strong> Sub-second latency
93
- </p>
94
-
95
- <p style="margin: 16px 0 8px 0; color: #374151; font-size: 14px; line-height: 1.6;">
96
- <strong>Upload a dermatoscopic image</strong> to experience real-time CNN inference with
97
- comprehensive medical information retrieval. This research prototype demonstrates
98
- advanced deep learning techniques including <em>Cross Entropy Loss optimization</em>,
99
- <em>Adam optimizer fine-tuning</em>, and <em>data augmentation strategies</em>.
100
- </p>
101
-
102
- <p style="margin: 8px 0 0 0; color: #dc2626; font-size: 13px; font-weight: 500;">
103
- ⚠️ UCV Research Prototype β€’ Not for clinical diagnosis β€’ Educational purposes only
104
- </p>
105
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  """
107
 
108
  def get_footer_html() -> str:
@@ -110,45 +74,31 @@ def get_footer_html() -> str:
110
  from ..config.settings import AppConfig
111
 
112
  return f"""
113
- <div style="background: #f8fafc; padding: 20px; border-radius: 12px; margin-top: 24px; text-align: center;">
 
 
114
 
115
- <div style="display: flex; justify-content: space-around; flex-wrap: wrap; gap: 20px; margin-bottom: 16px;">
116
-
117
- <div style="min-width: 200px;">
118
- <h4 style="color: #1e293b; margin: 0 0 8px 0; font-size: 14px;">πŸŽ“ Academic Research</h4>
119
- <p style="margin: 0; font-size: 12px; color: #64748b; line-height: 1.4;">
120
- <strong>Institution:</strong> {AppConfig.INSTITUTION}<br>
121
- <strong>Thesis Advisor:</strong> Dra. Margarita Oliver Lull<br>
122
- <strong>Research Focus:</strong> CNN Architecture Optimization
123
- </p>
124
- </div>
125
-
126
- <div style="min-width: 200px;">
127
- <h4 style="color: #1e293b; margin: 0 0 8px 0; font-size: 14px;">βš™οΈ Technical Implementation</h4>
128
- <p style="margin: 0; font-size: 12px; color: #64748b; line-height: 1.4;">
129
- <strong>Architecture:</strong> NFNet-L0 (24.1M params)<br>
130
- <strong>Optimization:</strong> Weight Standardization + Adam<br>
131
- <strong>Dataset:</strong> ISIC + Clinical Images (22,618 total)
132
- </p>
133
- </div>
134
-
135
- <div style="min-width: 200px;">
136
- <h4 style="color: #1e293b; margin: 0 0 8px 0; font-size: 14px;">πŸ“Š Performance Metrics</h4>
137
- <p style="margin: 0; font-size: 12px; color: #64748b; line-height: 1.4;">
138
- <strong>Precision:</strong> 96.0% &nbsp;β€’&nbsp; <strong>Recall:</strong> 96.0%<br>
139
- <strong>F1-Score:</strong> 0.96 &nbsp;β€’&nbsp; <strong>Specificity:</strong> 1.0<br>
140
- <strong>Cross Entropy Loss:</strong> 0.122597 (final)
141
- </p>
142
- </div>
143
-
144
- </div>
145
 
146
- <div style="border-top: 1px solid #e2e8f0; padding-top: 12px;">
147
- <p style="margin: 0; font-size: 11px; color: #94a3b8;">
148
- Model Version: {AppConfig.VERSION} β€’ Last Updated: {AppConfig.LAST_UPDATE} β€’
149
- Research & Development by Daniel Cavadia β€’ TEG UCV 2025
150
- </p>
151
- </div>
152
  </div>
153
  """
154
 
 
21
  .gradio-container { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }
22
  .gr-button { transition: all 0.2s ease; }
23
  .gr-button:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  """
25
 
26
  def create_theme():
 
38
  def get_header_html() -> str:
39
  """Get HTML for application header."""
40
  return """
41
+ <div class="header">
42
+ <h1 style="margin:0;">πŸ”¬ MelanoScope AI</h1>
43
+ <span class="badge">UCV Thesis Research</span>
44
+ <span class="badge">Production Ready</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
  </div>
46
+
47
+ <h3 style="color: #475569; margin: 8px 0;">NFNet-L0 Convolutional Neural Network for Dermatoscopic Image Classification</h3>
48
+
49
+ <p style="color: #64748b; margin: 12px 0; font-size: 14px;">
50
+ <strong>πŸŽ“ Institution:</strong> Universidad Central de Venezuela β€’
51
+ <strong>🧠 Architecture:</strong> NFNet-L0 + Weight Standardization β€’
52
+ <strong>🎯 Validation Accuracy:</strong> 96.17% (0.961718) β€’
53
+ <strong>⚑ Optimization:</strong> ONNX Runtime
54
+ </p>
55
+
56
+ <p style="color: #64748b; margin: 12px 0; font-size: 14px;">
57
+ <strong>πŸ“Š F1-Score:</strong> 0.96 β€’
58
+ <strong>πŸ” Specificity:</strong> 1.0 (Perfect) β€’
59
+ <strong>πŸ’Ύ Model Size:</strong> 24.1M parameters β€’
60
+ <strong>πŸš€ Inference:</strong> Sub-second latency
61
+ </p>
62
+
63
+ <p style="color: #374151; margin: 12px 0;">
64
+ <strong>Upload a dermatoscopic image</strong> to experience real-time CNN inference with comprehensive medical information retrieval. This research prototype demonstrates advanced deep learning techniques including Cross Entropy Loss optimization, Adam optimizer fine-tuning, and data augmentation strategies.
65
+ </p>
66
+
67
+ <p style="color: #dc2626; font-size: 13px; font-weight: 500;">
68
+ ⚠️ UCV Research Prototype β€’ Not for clinical diagnosis β€’ Educational purposes only
69
+ </p>
70
  """
71
 
72
  def get_footer_html() -> str:
 
74
  from ..config.settings import AppConfig
75
 
76
  return f"""
77
+ <div style="text-align: center; padding: 20px; background: #f8fafc; border-radius: 8px; margin-top: 20px;">
78
+
79
+ <p style="margin: 0 0 8px 0; color: #1e293b; font-weight: 600;">πŸŽ“ Academic Research Project</p>
80
 
81
+ <p style="margin: 0 0 8px 0; font-size: 13px; color: #64748b;">
82
+ <strong>Institution:</strong> {AppConfig.INSTITUTION} |
83
+ <strong>Thesis Advisor:</strong> Dra. Margarita Oliver Lull |
84
+ <strong>Research Focus:</strong> CNN Architecture Optimization
85
+ </p>
86
+
87
+ <p style="margin: 0 0 8px 0; font-size: 13px; color: #64748b;">
88
+ <strong>Architecture:</strong> NFNet-L0 (24.1M params) |
89
+ <strong>Dataset:</strong> ISIC + Clinical Images (22,618 total) |
90
+ <strong>Optimization:</strong> Weight Standardization + Adam
91
+ </p>
92
+
93
+ <p style="margin: 0 0 8px 0; font-size: 13px; color: #64748b;">
94
+ <strong>Performance:</strong> Precision 96.0%, Recall 96.0%, F1-Score 0.96, Specificity 1.0 |
95
+ <strong>Loss:</strong> Cross Entropy 0.122597 (final)
96
+ </p>
97
+
98
+ <p style="margin: 0; font-size: 11px; color: #94a3b8;">
99
+ Model Version: {AppConfig.VERSION} β€’ Last Updated: {AppConfig.LAST_UPDATE} β€’ Research & Development by Daniel Cavadia β€’ TEG UCV 2025
100
+ </p>
 
 
 
 
 
 
 
 
 
 
101
 
 
 
 
 
 
 
102
  </div>
103
  """
104