Upload 4 files
Browse files- Dockerfile +2 -2
- static/css/style.css +7 -3
- templates/report.html +10 -15
Dockerfile
CHANGED
|
@@ -11,7 +11,7 @@ WORKDIR /app
|
|
| 11 |
|
| 12 |
# Install system dependencies for OpenCV and other tools
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
-
libgl1
|
| 15 |
libglib2.0-0 \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
|
@@ -31,4 +31,4 @@ RUN mkdir -p uploads results encoder && chmod -R 777 uploads results encoder
|
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
# Run the application with Gunicorn
|
| 34 |
-
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "
|
|
|
|
| 11 |
|
| 12 |
# Install system dependencies for OpenCV and other tools
|
| 13 |
RUN apt-get update && apt-get install -y \
|
| 14 |
+
libgl1 \
|
| 15 |
libglib2.0-0 \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
|
|
|
| 31 |
EXPOSE 7860
|
| 32 |
|
| 33 |
# Run the application with Gunicorn
|
| 34 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
|
static/css/style.css
CHANGED
|
@@ -190,7 +190,7 @@ input[type="file"]:hover::file-selector-button {
|
|
| 190 |
/* Metrics Dashboard */
|
| 191 |
.metrics-grid {
|
| 192 |
display: grid;
|
| 193 |
-
grid-template-columns: repeat(auto-fit, minmax(
|
| 194 |
gap: 1.5rem;
|
| 195 |
margin: 2.5rem 0;
|
| 196 |
}
|
|
@@ -202,6 +202,9 @@ input[type="file"]:hover::file-selector-button {
|
|
| 202 |
padding: 2rem;
|
| 203 |
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
| 204 |
box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
|
|
|
|
|
|
|
|
|
|
| 205 |
}
|
| 206 |
|
| 207 |
.metric-item:hover {
|
|
@@ -211,12 +214,13 @@ input[type="file"]:hover::file-selector-button {
|
|
| 211 |
}
|
| 212 |
|
| 213 |
.metric-value {
|
| 214 |
-
font-size: clamp(2.
|
| 215 |
-
font-weight:
|
| 216 |
letter-spacing: -0.05em;
|
| 217 |
display: block;
|
| 218 |
color: white;
|
| 219 |
margin-bottom: 0.5rem;
|
|
|
|
| 220 |
}
|
| 221 |
|
| 222 |
.metric-label {
|
|
|
|
| 190 |
/* Metrics Dashboard */
|
| 191 |
.metrics-grid {
|
| 192 |
display: grid;
|
| 193 |
+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
| 194 |
gap: 1.5rem;
|
| 195 |
margin: 2.5rem 0;
|
| 196 |
}
|
|
|
|
| 202 |
padding: 2rem;
|
| 203 |
transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
|
| 204 |
box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.2);
|
| 205 |
+
overflow: hidden;
|
| 206 |
+
display: flex;
|
| 207 |
+
flex-direction: column;
|
| 208 |
}
|
| 209 |
|
| 210 |
.metric-item:hover {
|
|
|
|
| 214 |
}
|
| 215 |
|
| 216 |
.metric-value {
|
| 217 |
+
font-size: clamp(2.5rem, 6vw, 4.5rem);
|
| 218 |
+
font-weight: 900;
|
| 219 |
letter-spacing: -0.05em;
|
| 220 |
display: block;
|
| 221 |
color: white;
|
| 222 |
margin-bottom: 0.5rem;
|
| 223 |
+
line-height: 1;
|
| 224 |
}
|
| 225 |
|
| 226 |
.metric-label {
|
templates/report.html
CHANGED
|
@@ -34,34 +34,29 @@
|
|
| 34 |
<p class="label-mini">Performance Summary</p>
|
| 35 |
<div class="metrics-grid">
|
| 36 |
<div class="metric-item">
|
| 37 |
-
<span class="metric-value"
|
| 38 |
-
|
| 39 |
-
<span class="metric-label" style="font-size: 14px; font-weight: 800; opacity: 1;">ACCURACY</span>
|
| 40 |
<p class="metric-note">Percentage of correct predictions out of total samples.</p>
|
| 41 |
</div>
|
| 42 |
<div class="metric-item">
|
| 43 |
-
<span class="metric-value"
|
| 44 |
-
|
| 45 |
-
<span class="metric-label" style="font-size: 14px; font-weight: 800; opacity: 1;">WEIGHTED F1</span>
|
| 46 |
<p class="metric-note">Harmonic mean of precision and recall, weighted by class frequency.</p>
|
| 47 |
</div>
|
| 48 |
<div class="metric-item">
|
| 49 |
-
<span class="metric-value"
|
| 50 |
-
|
| 51 |
-
<span class="metric-label" style="font-size: 14px; font-weight: 800; opacity: 1;">MACRO F1</span>
|
| 52 |
<p class="metric-note">Unweighted mean of F1 scores across all classes (highlights imbalance
|
| 53 |
issues).</p>
|
| 54 |
</div>
|
| 55 |
<div class="metric-item">
|
| 56 |
-
<span class="metric-value"
|
| 57 |
-
|
| 58 |
-
<span class="metric-label" style="font-size: 14px; font-weight: 800; opacity: 1;">PRECISION</span>
|
| 59 |
<p class="metric-note">Ability of the classifier not to label a negative sample as positive.</p>
|
| 60 |
</div>
|
| 61 |
<div class="metric-item">
|
| 62 |
-
<span class="metric-value"
|
| 63 |
-
|
| 64 |
-
<span class="metric-label" style="font-size: 14px; font-weight: 800; opacity: 1;">RECALL</span>
|
| 65 |
<p class="metric-note">Ability of the classifier to find all positive samples.</p>
|
| 66 |
</div>
|
| 67 |
</div>
|
|
|
|
| 34 |
<p class="label-mini">Performance Summary</p>
|
| 35 |
<div class="metrics-grid">
|
| 36 |
<div class="metric-item">
|
| 37 |
+
<span class="metric-value">{{ (metrics.accuracy * 100)|round(2) }}%</span>
|
| 38 |
+
<span class="metric-label">ACCURACY</span>
|
|
|
|
| 39 |
<p class="metric-note">Percentage of correct predictions out of total samples.</p>
|
| 40 |
</div>
|
| 41 |
<div class="metric-item">
|
| 42 |
+
<span class="metric-value">{{ metrics.f1|round(4) }}</span>
|
| 43 |
+
<span class="metric-label">WEIGHTED F1</span>
|
|
|
|
| 44 |
<p class="metric-note">Harmonic mean of precision and recall, weighted by class frequency.</p>
|
| 45 |
</div>
|
| 46 |
<div class="metric-item">
|
| 47 |
+
<span class="metric-value">{{ metrics.macro_f1|round(4) }}</span>
|
| 48 |
+
<span class="metric-label">MACRO F1</span>
|
|
|
|
| 49 |
<p class="metric-note">Unweighted mean of F1 scores across all classes (highlights imbalance
|
| 50 |
issues).</p>
|
| 51 |
</div>
|
| 52 |
<div class="metric-item">
|
| 53 |
+
<span class="metric-value">{{ metrics.precision|round(4) }}</span>
|
| 54 |
+
<span class="metric-label">PRECISION</span>
|
|
|
|
| 55 |
<p class="metric-note">Ability of the classifier not to label a negative sample as positive.</p>
|
| 56 |
</div>
|
| 57 |
<div class="metric-item">
|
| 58 |
+
<span class="metric-value">{{ metrics.recall|round(4) }}</span>
|
| 59 |
+
<span class="metric-label">RECALL</span>
|
|
|
|
| 60 |
<p class="metric-note">Ability of the classifier to find all positive samples.</p>
|
| 61 |
</div>
|
| 62 |
</div>
|