Spaces:
Sleeping
Sleeping
Upload 6 files
Browse files- .gitattributes +1 -0
- .gitignore +4 -0
- static/favicon.png +3 -0
- static/style.css +218 -0
- templates/index.html +51 -0
- templates/mcq_step.html +59 -0
- templates/results.html +47 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
static/favicon.png filter=lfs diff=lfs merge=lfs -text
|
.gitignore
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
MBTI_Report.pdf
|
| 2 |
+
ML_Project_Presentation_Slide_Titles.pdf
|
| 3 |
+
ML_Project_Report_Format.pdf
|
| 4 |
+
vertopal.com_mbti-personality.pdf
|
static/favicon.png
ADDED
|
|
Git LFS Details
|
static/style.css
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
body {
|
| 2 |
+
background: #f8f9fa;
|
| 3 |
+
font-family: 'Montserrat', 'Inter', Arial, sans-serif;
|
| 4 |
+
color: #222;
|
| 5 |
+
min-height: 100vh;
|
| 6 |
+
}
|
| 7 |
+
|
| 8 |
+
.glass-container {
|
| 9 |
+
background: rgba(255,255,255,0.99);
|
| 10 |
+
border-radius: 28px;
|
| 11 |
+
box-shadow: 0 8px 32px 0 rgba(120,116,100,0.08);
|
| 12 |
+
padding: 3rem 2rem;
|
| 13 |
+
margin: 4rem auto;
|
| 14 |
+
max-width: 680px;
|
| 15 |
+
border: 1.2px solid #ece3c2;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.header h1 {
|
| 19 |
+
font-family: 'Playfair Display', serif;
|
| 20 |
+
font-size: 2.2rem;
|
| 21 |
+
color: #e8c77a;
|
| 22 |
+
font-weight: 900;
|
| 23 |
+
margin-bottom: 0.5rem;
|
| 24 |
+
letter-spacing: 2px;
|
| 25 |
+
}
|
| 26 |
+
.subtitle {
|
| 27 |
+
color: #565458;
|
| 28 |
+
font-weight: 600;
|
| 29 |
+
font-size: 1.17rem;
|
| 30 |
+
letter-spacing: 1px;
|
| 31 |
+
margin-bottom: 1.8rem;
|
| 32 |
+
}
|
| 33 |
+
.mcq-section {margin-bottom: 2.2rem;}
|
| 34 |
+
.input-group.mcq-options {
|
| 35 |
+
margin-bottom: 1.45rem;
|
| 36 |
+
}
|
| 37 |
+
.input-group label {
|
| 38 |
+
font-family: 'Montserrat', sans-serif;
|
| 39 |
+
font-size: 1.14rem;
|
| 40 |
+
color: #222;
|
| 41 |
+
font-weight: 700;
|
| 42 |
+
margin-bottom: 8px;
|
| 43 |
+
display: block;
|
| 44 |
+
}
|
| 45 |
+
.input-group label b {
|
| 46 |
+
color: #d3a63c;
|
| 47 |
+
font-weight: 800;
|
| 48 |
+
}
|
| 49 |
+
.mcq-row {
|
| 50 |
+
display: flex;
|
| 51 |
+
gap: 1.2rem;
|
| 52 |
+
margin-top: 0.36rem;
|
| 53 |
+
justify-content: flex-start;
|
| 54 |
+
}
|
| 55 |
+
.mcq-row label {
|
| 56 |
+
flex: 1;
|
| 57 |
+
color: #95702b;
|
| 58 |
+
font-weight: 500;
|
| 59 |
+
background: rgba(232,203,84,0.08);
|
| 60 |
+
border-radius: 12px;
|
| 61 |
+
padding: 0.8rem 0.4rem;
|
| 62 |
+
border: 1.3px solid #efecc7;
|
| 63 |
+
box-shadow: 0 1px 4px #e8c77a18 inset;
|
| 64 |
+
transition: background 0.15s, box-shadow 0.17s, border 0.15s;
|
| 65 |
+
text-align: center;
|
| 66 |
+
cursor: pointer;
|
| 67 |
+
}
|
| 68 |
+
.mcq-row input[type="radio"] {
|
| 69 |
+
accent-color: #222;
|
| 70 |
+
width: 18px;
|
| 71 |
+
height: 18px;
|
| 72 |
+
vertical-align: middle;
|
| 73 |
+
margin-right: 0.4em;
|
| 74 |
+
}
|
| 75 |
+
.mcq-row label:hover,
|
| 76 |
+
.mcq-row label:active {
|
| 77 |
+
background: #fff6db;
|
| 78 |
+
color: #111;
|
| 79 |
+
border: 1.8px solid #e8c77a;
|
| 80 |
+
box-shadow: 0 5px 14px #e8c77a44;
|
| 81 |
+
}
|
| 82 |
+
.mcq-row input[type="radio"]:checked + span,
|
| 83 |
+
.mcq-row input[type="radio"]:checked ~ label {
|
| 84 |
+
color: #222;
|
| 85 |
+
font-weight: 700;
|
| 86 |
+
background: #fffbe6;
|
| 87 |
+
border: 1.8px solid #b79818;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.next-btn, .predict-btn, .glass-btn {
|
| 91 |
+
background: linear-gradient(90deg,#fffecd 0%,#e8c77a 100%);
|
| 92 |
+
color: #3b3020;
|
| 93 |
+
font-family: 'Montserrat',sans-serif;
|
| 94 |
+
font-weight: 700;
|
| 95 |
+
border-radius: 18px;
|
| 96 |
+
border: none;
|
| 97 |
+
padding: 1.07rem 2rem;
|
| 98 |
+
box-shadow: 0 2px 18px #e8c77a38;
|
| 99 |
+
font-size: 1.13rem;
|
| 100 |
+
letter-spacing: 1px;
|
| 101 |
+
margin-top: 18px;
|
| 102 |
+
margin-bottom: 8px;
|
| 103 |
+
transition: background 0.14s, box-shadow 0.16s;
|
| 104 |
+
cursor:pointer;
|
| 105 |
+
}
|
| 106 |
+
.next-btn:hover, .glass-btn:hover, .predict-btn:hover {
|
| 107 |
+
background: linear-gradient(90deg,#fffbe6 10%, #e8c77a 90%);
|
| 108 |
+
color: #bf953f;
|
| 109 |
+
box-shadow: 0 0px 24px #e8c77a39;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
.result-card {
|
| 113 |
+
background: rgba(255,255,255,0.97);
|
| 114 |
+
border-radius: 18px;
|
| 115 |
+
box-shadow: 0 6px 28px #ecc16a18;
|
| 116 |
+
padding: 2.1rem 1.2rem 2.7rem 1.2rem;
|
| 117 |
+
margin-top: 1.2rem;
|
| 118 |
+
border: 1.3px solid #ffeecd;
|
| 119 |
+
text-align: center;
|
| 120 |
+
}
|
| 121 |
+
.mbti-type {
|
| 122 |
+
font-family: 'Playfair Display', serif;
|
| 123 |
+
font-size: 2.1rem;
|
| 124 |
+
color: #e8c77a;
|
| 125 |
+
font-weight: 900;
|
| 126 |
+
margin-bottom: 1.3rem;
|
| 127 |
+
letter-spacing: 2px;
|
| 128 |
+
}
|
| 129 |
+
.mbti-description {
|
| 130 |
+
color: #222;
|
| 131 |
+
margin-bottom: 1.4rem;
|
| 132 |
+
font-size:1.04rem;
|
| 133 |
+
font-weight: 400;
|
| 134 |
+
letter-spacing: .8px;
|
| 135 |
+
}
|
| 136 |
+
.prob-bar {
|
| 137 |
+
background: #f8f3cf;
|
| 138 |
+
border-radius: 11px;
|
| 139 |
+
height: 16px;
|
| 140 |
+
box-shadow: 0 1px 4px #e8c77a18 inset;
|
| 141 |
+
position: relative;
|
| 142 |
+
margin: 2px 0;
|
| 143 |
+
}
|
| 144 |
+
.prob-fill {
|
| 145 |
+
height: 100%;
|
| 146 |
+
background: linear-gradient(90deg,#ecc16a 80%,#fffecd 100%);
|
| 147 |
+
border-radius: 11px;
|
| 148 |
+
transition: width 0.6s;
|
| 149 |
+
}
|
| 150 |
+
.prob-value {
|
| 151 |
+
font-weight: 700;
|
| 152 |
+
color: #b79818;
|
| 153 |
+
text-shadow: 1px 1px 2px #ffeecd55;
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
.input-group input[type="number"],
|
| 157 |
+
.input-group select {
|
| 158 |
+
display: block;
|
| 159 |
+
width: 100%;
|
| 160 |
+
padding: 1.06rem 1.2rem;
|
| 161 |
+
margin-top: 2px;
|
| 162 |
+
font-size: 1.14rem;
|
| 163 |
+
font-weight: 500;
|
| 164 |
+
color: #222;
|
| 165 |
+
background: rgba(232,203,84,0.08);
|
| 166 |
+
border: 1.3px solid #efecc7;
|
| 167 |
+
border-radius: 12px;
|
| 168 |
+
box-shadow: 0 1px 4px #e8c77a18 inset;
|
| 169 |
+
transition: background 0.13s, border 0.13s, box-shadow 0.13s;
|
| 170 |
+
}
|
| 171 |
+
.input-group input[type="number"]:focus,
|
| 172 |
+
.input-group select:focus {
|
| 173 |
+
background: #fffbe6;
|
| 174 |
+
outline: none;
|
| 175 |
+
border: 1.8px solid #e8c77a;
|
| 176 |
+
box-shadow: 0 4px 13px #e8c77a35;
|
| 177 |
+
}
|
| 178 |
+
.input-group input[type="number"]::placeholder {
|
| 179 |
+
color: #bbb685;
|
| 180 |
+
opacity: 1;
|
| 181 |
+
}
|
| 182 |
+
.input-group select {
|
| 183 |
+
box-shadow: 0 1px 4px #e8c77a11 inset;
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
input[type="number"], select {
|
| 187 |
+
background: rgba(232,203,84,0.08);
|
| 188 |
+
border-radius: 12px;
|
| 189 |
+
border: 1.3px solid #efecc7;
|
| 190 |
+
font-size: 1.14rem;
|
| 191 |
+
}
|
| 192 |
+
|
| 193 |
+
.input-group input[type="number"] {
|
| 194 |
+
width: 100%;
|
| 195 |
+
box-sizing: border-box;
|
| 196 |
+
appearance: none;
|
| 197 |
+
-webkit-appearance: none;
|
| 198 |
+
margin: 0;
|
| 199 |
+
min-width: 0;
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
@media (max-width: 700px) {
|
| 203 |
+
.input-group input[type="number"], .input-group select,
|
| 204 |
+
input[type="number"], select {
|
| 205 |
+
font-size: 0.99rem;
|
| 206 |
+
padding: 0.85rem 1rem;
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
@media (max-width: 700px) {
|
| 210 |
+
.glass-container { max-width:96vw; padding:1.2rem 0.7rem; margin:2vw auto; }
|
| 211 |
+
.header h1 { font-size: 1.35rem; }
|
| 212 |
+
.subtitle { font-size:1rem; }
|
| 213 |
+
input, select { font-size:1rem; padding:0.85rem 1rem;}
|
| 214 |
+
.next-btn, .predict-btn { font-size:0.97rem; }
|
| 215 |
+
}
|
| 216 |
+
@media (max-width:450px){
|
| 217 |
+
.glass-container{padding:0.6rem 1vw;}
|
| 218 |
+
}
|
templates/index.html
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Personality Predictor | Start</title>
|
| 6 |
+
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900|Montserrat:600,700&display=swap" rel="stylesheet">
|
| 7 |
+
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon.png') }}">
|
| 8 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div class="glass-container">
|
| 12 |
+
<div class="header">
|
| 13 |
+
<h1>🧠 Personality Predictor</h1>
|
| 14 |
+
<p class="subtitle">Step 1: Enter your demographic information</p>
|
| 15 |
+
</div>
|
| 16 |
+
<form method="post" class="personality-form single-step-form">
|
| 17 |
+
<div class="input-group">
|
| 18 |
+
<label for="age">Age</label>
|
| 19 |
+
<input type="number" id="age" name="age" min="1" max="100" placeholder="e.g., 25" required>
|
| 20 |
+
</div>
|
| 21 |
+
<div class="input-group">
|
| 22 |
+
<label for="gender">Gender</label>
|
| 23 |
+
<select id="gender" name="gender" required>
|
| 24 |
+
{% for g in gender_classes %}
|
| 25 |
+
<option value="{{g}}">{{g}}</option>
|
| 26 |
+
{% endfor %}
|
| 27 |
+
</select>
|
| 28 |
+
</div>
|
| 29 |
+
<div class="input-group">
|
| 30 |
+
<label for="education">Education Level</label>
|
| 31 |
+
<select id="education" name="education" required>
|
| 32 |
+
{% for e in edu_classes %}
|
| 33 |
+
<option value="{{e}}">
|
| 34 |
+
{% if e == 0 %}High School/Undergraduate{% else %}Graduate/Postgraduate{% endif %}
|
| 35 |
+
</option>
|
| 36 |
+
{% endfor %}
|
| 37 |
+
</select>
|
| 38 |
+
</div>
|
| 39 |
+
<div class="input-group">
|
| 40 |
+
<label for="interest">Primary Interest</label>
|
| 41 |
+
<select id="interest" name="interest" required>
|
| 42 |
+
{% for i in interest_classes %}
|
| 43 |
+
<option value="{{i}}">{{i}}</option>
|
| 44 |
+
{% endfor %}
|
| 45 |
+
</select>
|
| 46 |
+
</div>
|
| 47 |
+
<button type="submit" class="next-btn glass-btn">Next</button>
|
| 48 |
+
</form>
|
| 49 |
+
</div>
|
| 50 |
+
</body>
|
| 51 |
+
</html>
|
templates/mcq_step.html
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Personality Step {{ step }} of {{ total_steps }}</title>
|
| 6 |
+
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon-removebg.png') }}">
|
| 7 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 8 |
+
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:800,900|Montserrat:400,600,700&display=swap" rel="stylesheet">
|
| 9 |
+
<script>
|
| 10 |
+
function validateForm() {
|
| 11 |
+
const inputs = document.querySelectorAll('.mcq-options input[type="radio"]:checked');
|
| 12 |
+
if (inputs.length < 4) {
|
| 13 |
+
alert("Please answer all 4 questions to continue.");
|
| 14 |
+
return false;
|
| 15 |
+
}
|
| 16 |
+
return true;
|
| 17 |
+
}
|
| 18 |
+
</script>
|
| 19 |
+
</head>
|
| 20 |
+
<body class="animated-bg">
|
| 21 |
+
<div class="glass-container fade-in">
|
| 22 |
+
<div class="header neon-glow">
|
| 23 |
+
<h1>🧩 Step {{ step }} of {{ total_steps }}</h1>
|
| 24 |
+
<div class="progress-bar glass-progress">
|
| 25 |
+
<div class="progress" style="width: {{ (step / total_steps) * 100 }}%"></div>
|
| 26 |
+
</div>
|
| 27 |
+
<h2>{{ trait_label }} Questions</h2>
|
| 28 |
+
</div>
|
| 29 |
+
<form method="post" action="{{ url_for('mcq', step=step+1) }}" onsubmit="return validateForm();" class="mcq-form">
|
| 30 |
+
<div class="mcq-section">
|
| 31 |
+
{% for qtext in questions %}
|
| 32 |
+
<div class="input-group mcq-options">
|
| 33 |
+
<label><b>Q{{ loop.index }}:</b> <span>{{ qtext }}</span></label>
|
| 34 |
+
<div class="mcq-row">
|
| 35 |
+
<label>
|
| 36 |
+
<input type="radio" name="{{ trait_key }}_q{{ loop.index }}" value="A" required>
|
| 37 |
+
<span>Excellent/Always</span>
|
| 38 |
+
</label>
|
| 39 |
+
<label>
|
| 40 |
+
<input type="radio" name="{{ trait_key }}_q{{ loop.index }}" value="B">
|
| 41 |
+
<span>Good/Usually</span>
|
| 42 |
+
</label>
|
| 43 |
+
<label>
|
| 44 |
+
<input type="radio" name="{{ trait_key }}_q{{ loop.index }}" value="C">
|
| 45 |
+
<span>Fair/Sometimes</span>
|
| 46 |
+
</label>
|
| 47 |
+
<label>
|
| 48 |
+
<input type="radio" name="{{ trait_key }}_q{{ loop.index }}" value="D">
|
| 49 |
+
<span>Poor/Rarely</span>
|
| 50 |
+
</label>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
{% endfor %}
|
| 54 |
+
</div>
|
| 55 |
+
<button type="submit" class="next-btn glass-btn">{% if step == total_steps %}See Results{% else %}Next{% endif %}</button>
|
| 56 |
+
</form>
|
| 57 |
+
</div>
|
| 58 |
+
</body>
|
| 59 |
+
</html>
|
templates/results.html
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Your Personality Type</title>
|
| 6 |
+
<link href="https://fonts.googleapis.com/css?family=Playfair+Display:700,900|Montserrat:600,700&display=swap" rel="stylesheet">
|
| 7 |
+
<link rel="icon" type="image/png" href="{{ url_for('static', filename='favicon-removebg.png') }}">
|
| 8 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div class="glass-container">
|
| 12 |
+
<div class="header">
|
| 13 |
+
<h1>🎯 Your Personality Type</h1>
|
| 14 |
+
</div>
|
| 15 |
+
{% if mbti_pred %}
|
| 16 |
+
<div class="result-card">
|
| 17 |
+
<h2 class="mbti-type">{{ mbti_pred }}</h2>
|
| 18 |
+
<p class="mbti-description">{{ description }}</p>
|
| 19 |
+
<h3 style="margin-top:2.1rem; color:#222;">Confidence Breakdown</h3>
|
| 20 |
+
<div class="prob-grid" style="margin-bottom:2rem;">
|
| 21 |
+
{% for cls, prob in class_probs.items() %}
|
| 22 |
+
{% if prob > 0.01 %}
|
| 23 |
+
<div class="prob-item" style="display:flex;align-items:center;gap:1.2rem;">
|
| 24 |
+
<span class="prob-type" style="color:#95702b; min-width:60px; font-weight:500;">{{cls}}</span>
|
| 25 |
+
<div class="prob-bar" style="flex:1;position:relative;">
|
| 26 |
+
<div class="prob-fill" style="width: {{prob*100}}%;"></div>
|
| 27 |
+
<span class="prob-value" style="position:absolute;right:10px;top:50%;transform:translateY(-50%);font-weight:700;color:#b79818;">{{(prob*100)|round(1)}}%</span>
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
{% endif %}
|
| 31 |
+
{% endfor %}
|
| 32 |
+
</div>
|
| 33 |
+
<div style="text-align:center;">
|
| 34 |
+
<a href="{{ url_for('demographics') }}" class="predict-btn glass-btn" style="text-decoration: none;">Retake Test</a>
|
| 35 |
+
</div>
|
| 36 |
+
</div>
|
| 37 |
+
{% elif description and description.startswith('Error') %}
|
| 38 |
+
<div class="result-card" style="color:#b79818;font-weight:700;margin-bottom:2rem;">
|
| 39 |
+
{{ description }}
|
| 40 |
+
</div>
|
| 41 |
+
<div style="text-align:center;">
|
| 42 |
+
<a href="{{ url_for('demographics') }}" class="predict-btn glass-btn" style="text-decoration: none;">Try Again</a>
|
| 43 |
+
</div>
|
| 44 |
+
{% endif %}
|
| 45 |
+
</div>
|
| 46 |
+
</body>
|
| 47 |
+
</html>
|