Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +433 -19
- prompts.txt +0 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: projetos
|
3 |
+
emoji: 🐳
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: gray
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,433 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="pt-BR">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>Calculadora de IMC - Saúde e Bem-estar</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.gradient-bg {
|
11 |
+
background: linear-gradient(135deg, #4f46e5 0%, #10b981 100%);
|
12 |
+
}
|
13 |
+
.result-box {
|
14 |
+
transition: all 0.5s ease;
|
15 |
+
max-height: 0;
|
16 |
+
overflow: hidden;
|
17 |
+
}
|
18 |
+
.result-box.show {
|
19 |
+
max-height: 500px;
|
20 |
+
}
|
21 |
+
.progress-bar {
|
22 |
+
height: 8px;
|
23 |
+
background: #e5e7eb;
|
24 |
+
border-radius: 4px;
|
25 |
+
overflow: hidden;
|
26 |
+
}
|
27 |
+
.progress-fill {
|
28 |
+
height: 100%;
|
29 |
+
transition: width 0.5s ease;
|
30 |
+
}
|
31 |
+
.tooltip {
|
32 |
+
position: relative;
|
33 |
+
display: inline-block;
|
34 |
+
}
|
35 |
+
.tooltip .tooltip-text {
|
36 |
+
visibility: hidden;
|
37 |
+
width: 200px;
|
38 |
+
background-color: #333;
|
39 |
+
color: #fff;
|
40 |
+
text-align: center;
|
41 |
+
border-radius: 6px;
|
42 |
+
padding: 5px;
|
43 |
+
position: absolute;
|
44 |
+
z-index: 1;
|
45 |
+
bottom: 125%;
|
46 |
+
left: 50%;
|
47 |
+
margin-left: -100px;
|
48 |
+
opacity: 0;
|
49 |
+
transition: opacity 0.3s;
|
50 |
+
}
|
51 |
+
.tooltip:hover .tooltip-text {
|
52 |
+
visibility: visible;
|
53 |
+
opacity: 1;
|
54 |
+
}
|
55 |
+
@keyframes pulse {
|
56 |
+
0% { transform: scale(1); }
|
57 |
+
50% { transform: scale(1.05); }
|
58 |
+
100% { transform: scale(1); }
|
59 |
+
}
|
60 |
+
.pulse {
|
61 |
+
animation: pulse 2s infinite;
|
62 |
+
}
|
63 |
+
</style>
|
64 |
+
</head>
|
65 |
+
<body class="bg-gray-50 font-sans">
|
66 |
+
<div class="min-h-screen flex flex-col">
|
67 |
+
<!-- Header -->
|
68 |
+
<header class="gradient-bg text-white py-8 px-4 shadow-lg">
|
69 |
+
<div class="container mx-auto text-center">
|
70 |
+
<h1 class="text-4xl font-bold mb-2">Calculadora de IMC</h1>
|
71 |
+
<p class="text-xl opacity-90">Descubra seu Índice de Massa Corporal e saiba como melhorar sua saúde</p>
|
72 |
+
</div>
|
73 |
+
</header>
|
74 |
+
|
75 |
+
<!-- Main Content -->
|
76 |
+
<main class="flex-grow container mx-auto px-4 py-8">
|
77 |
+
<div class="max-w-3xl mx-auto bg-white rounded-xl shadow-md overflow-hidden">
|
78 |
+
<!-- Calculator Section -->
|
79 |
+
<div class="p-6 md:p-8">
|
80 |
+
<h2 class="text-2xl font-semibold text-gray-800 mb-6">Preencha seus dados</h2>
|
81 |
+
|
82 |
+
<form id="imcForm" class="space-y-6">
|
83 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
84 |
+
<!-- Height Input -->
|
85 |
+
<div>
|
86 |
+
<label for="height" class="block text-sm font-medium text-gray-700 mb-1">
|
87 |
+
Altura (cm)
|
88 |
+
<span class="tooltip ml-1">
|
89 |
+
<i class="fas fa-info-circle text-blue-500"></i>
|
90 |
+
<span class="tooltip-text">Informe sua altura em centímetros. Ex: 175cm</span>
|
91 |
+
</span>
|
92 |
+
</label>
|
93 |
+
<div class="relative">
|
94 |
+
<input type="number" id="height" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Ex: 175" min="100" max="250" required>
|
95 |
+
<span class="absolute right-3 top-3 text-gray-500">cm</span>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<!-- Weight Input -->
|
100 |
+
<div>
|
101 |
+
<label for="weight" class="block text-sm font-medium text-gray-700 mb-1">
|
102 |
+
Peso (kg)
|
103 |
+
<span class="tooltip ml-1">
|
104 |
+
<i class="fas fa-info-circle text-blue-500"></i>
|
105 |
+
<span class="tooltip-text">Informe seu peso em quilogramas. Ex: 68kg</span>
|
106 |
+
</span>
|
107 |
+
</label>
|
108 |
+
<div class="relative">
|
109 |
+
<input type="number" id="weight" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Ex: 68" min="30" max="300" required>
|
110 |
+
<span class="absolute right-3 top-3 text-gray-500">kg</span>
|
111 |
+
</div>
|
112 |
+
</div>
|
113 |
+
</div>
|
114 |
+
|
115 |
+
<!-- Age Input -->
|
116 |
+
<div>
|
117 |
+
<label for="age" class="block text-sm font-medium text-gray-700 mb-1">Idade (opcional)</label>
|
118 |
+
<input type="number" id="age" class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500" placeholder="Ex: 35" min="2" max="120">
|
119 |
+
</div>
|
120 |
+
|
121 |
+
<!-- Gender Selection -->
|
122 |
+
<div>
|
123 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Sexo (opcional)</label>
|
124 |
+
<div class="flex space-x-4">
|
125 |
+
<label class="inline-flex items-center">
|
126 |
+
<input type="radio" name="gender" value="male" class="h-5 w-5 text-blue-600">
|
127 |
+
<span class="ml-2 text-gray-700">Masculino</span>
|
128 |
+
</label>
|
129 |
+
<label class="inline-flex items-center">
|
130 |
+
<input type="radio" name="gender" value="female" class="h-5 w-5 text-blue-600">
|
131 |
+
<span class="ml-2 text-gray-700">Feminino</span>
|
132 |
+
</label>
|
133 |
+
</div>
|
134 |
+
</div>
|
135 |
+
|
136 |
+
<!-- Calculate Button -->
|
137 |
+
<div class="pt-2">
|
138 |
+
<button type="submit" class="w-full gradient-bg text-white py-3 px-6 rounded-lg font-semibold text-lg hover:opacity-90 transition duration-300 shadow-md flex items-center justify-center">
|
139 |
+
<i class="fas fa-calculator mr-2"></i> Calcular IMC
|
140 |
+
</button>
|
141 |
+
</div>
|
142 |
+
</form>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
<!-- Results Section (Initially Hidden) -->
|
146 |
+
<div id="resultBox" class="result-box px-6 pb-6">
|
147 |
+
<div class="border-t border-gray-200 pt-6">
|
148 |
+
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Seu Resultado</h2>
|
149 |
+
|
150 |
+
<!-- IMC Value -->
|
151 |
+
<div class="bg-gray-50 rounded-lg p-4 mb-6">
|
152 |
+
<div class="flex justify-between items-center mb-2">
|
153 |
+
<span class="text-lg font-medium text-gray-700">Seu IMC:</span>
|
154 |
+
<span id="imcValue" class="text-3xl font-bold text-blue-600">--</span>
|
155 |
+
</div>
|
156 |
+
<div class="progress-bar">
|
157 |
+
<div id="progressFill" class="progress-fill" style="width: 0%"></div>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<!-- Classification -->
|
162 |
+
<div id="classification" class="mb-6">
|
163 |
+
<div class="flex items-start">
|
164 |
+
<div id="statusIcon" class="text-4xl mr-3"></div>
|
165 |
+
<div>
|
166 |
+
<h3 id="statusTitle" class="text-xl font-semibold mb-1"></h3>
|
167 |
+
<p id="statusDescription" class="text-gray-600"></p>
|
168 |
+
</div>
|
169 |
+
</div>
|
170 |
+
</div>
|
171 |
+
|
172 |
+
<!-- Health Risks -->
|
173 |
+
<div id="healthRisks" class="bg-red-50 border-l-4 border-red-500 rounded-r-lg p-4 mb-6 hidden">
|
174 |
+
<div class="flex">
|
175 |
+
<div class="flex-shrink-0 text-red-500">
|
176 |
+
<i class="fas fa-exclamation-triangle text-xl"></i>
|
177 |
+
</div>
|
178 |
+
<div class="ml-3">
|
179 |
+
<h3 class="text-lg font-medium text-red-800 mb-2">Riscos à Saúde</h3>
|
180 |
+
<div id="risksList" class="text-red-700 space-y-2"></div>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
|
185 |
+
<!-- Recommendations -->
|
186 |
+
<div id="recommendations" class="bg-blue-50 border-l-4 border-blue-500 rounded-r-lg p-4">
|
187 |
+
<div class="flex">
|
188 |
+
<div class="flex-shrink-0 text-blue-500">
|
189 |
+
<i class="fas fa-heartbeat text-xl"></i>
|
190 |
+
</div>
|
191 |
+
<div class="ml-3">
|
192 |
+
<h3 class="text-lg font-medium text-blue-800 mb-2">Recomendações</h3>
|
193 |
+
<div id="recommendationsList" class="text-blue-700 space-y-2"></div>
|
194 |
+
</div>
|
195 |
+
</div>
|
196 |
+
</div>
|
197 |
+
</div>
|
198 |
+
</div>
|
199 |
+
</div>
|
200 |
+
|
201 |
+
<!-- IMC Table Info -->
|
202 |
+
<div class="max-w-3xl mx-auto mt-8 bg-white rounded-xl shadow-md overflow-hidden">
|
203 |
+
<div class="p-6 md:p-8">
|
204 |
+
<h2 class="text-2xl font-semibold text-gray-800 mb-4">Tabela de Classificação do IMC</h2>
|
205 |
+
<div class="overflow-x-auto">
|
206 |
+
<table class="min-w-full divide-y divide-gray-200">
|
207 |
+
<thead class="bg-gray-50">
|
208 |
+
<tr>
|
209 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">IMC</th>
|
210 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Classificação</th>
|
211 |
+
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Risco de Saúde</th>
|
212 |
+
</tr>
|
213 |
+
</thead>
|
214 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
215 |
+
<tr class="hover:bg-gray-50">
|
216 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Abaixo de 18,5</td>
|
217 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Abaixo do peso</td>
|
218 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Desnutrição, osteoporose</td>
|
219 |
+
</tr>
|
220 |
+
<tr class="hover:bg-gray-50">
|
221 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">18,5 - 24,9</td>
|
222 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Peso normal</td>
|
223 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Baixo risco</td>
|
224 |
+
</tr>
|
225 |
+
<tr class="hover:bg-gray-50">
|
226 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">25,0 - 29,9</td>
|
227 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sobrepeso</td>
|
228 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Risco aumentado</td>
|
229 |
+
</tr>
|
230 |
+
<tr class="hover:bg-gray-50">
|
231 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">30,0 - 34,9</td>
|
232 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Obesidade Grau I</td>
|
233 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Alto risco</td>
|
234 |
+
</tr>
|
235 |
+
<tr class="hover:bg-gray-50">
|
236 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">35,0 - 39,9</td>
|
237 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Obesidade Grau II</td>
|
238 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Muito alto risco</td>
|
239 |
+
</tr>
|
240 |
+
<tr class="hover:bg-gray-50">
|
241 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Acima de 40,0</td>
|
242 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Obesidade Grau III</td>
|
243 |
+
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Risco extremo</td>
|
244 |
+
</tr>
|
245 |
+
</tbody>
|
246 |
+
</table>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
</div>
|
250 |
+
</main>
|
251 |
+
|
252 |
+
<!-- Footer -->
|
253 |
+
<footer class="bg-gray-800 text-white py-6 px-4">
|
254 |
+
<div class="container mx-auto text-center">
|
255 |
+
<p class="mb-2">© 2023 Calculadora de IMC - Todos os direitos reservados</p>
|
256 |
+
<p class="text-sm text-gray-400">Esta calculadora fornece apenas informações gerais e não substitui orientações médicas profissionais.</p>
|
257 |
+
</div>
|
258 |
+
</footer>
|
259 |
+
</div>
|
260 |
+
|
261 |
+
<script>
|
262 |
+
document.getElementById('imcForm').addEventListener('submit', function(e) {
|
263 |
+
e.preventDefault();
|
264 |
+
|
265 |
+
// Get input values
|
266 |
+
const height = parseFloat(document.getElementById('height').value) / 100; // Convert cm to m
|
267 |
+
const weight = parseFloat(document.getElementById('weight').value);
|
268 |
+
|
269 |
+
// Calculate IMC
|
270 |
+
const imc = weight / (height * height);
|
271 |
+
const roundedImc = Math.round(imc * 10) / 10;
|
272 |
+
|
273 |
+
// Display result
|
274 |
+
document.getElementById('imcValue').textContent = roundedImc;
|
275 |
+
|
276 |
+
// Calculate progress bar position (IMC range: 15 to 45)
|
277 |
+
const progressPercentage = ((roundedImc - 15) / 30) * 100;
|
278 |
+
document.getElementById('progressFill').style.width = `${Math.min(Math.max(progressPercentage, 0), 100)}%`;
|
279 |
+
|
280 |
+
// Determine classification and set colors
|
281 |
+
let classification, statusColor, iconClass, icon;
|
282 |
+
|
283 |
+
if (roundedImc < 18.5) {
|
284 |
+
classification = "Abaixo do peso";
|
285 |
+
statusColor = "text-yellow-600";
|
286 |
+
iconClass = "fas fa-exclamation-circle text-yellow-500";
|
287 |
+
icon = "⚠️";
|
288 |
+
} else if (roundedImc >= 18.5 && roundedImc < 25) {
|
289 |
+
classification = "Peso normal";
|
290 |
+
statusColor = "text-green-600";
|
291 |
+
iconClass = "fas fa-check-circle text-green-500";
|
292 |
+
icon = "✅";
|
293 |
+
} else if (roundedImc >= 25 && roundedImc < 30) {
|
294 |
+
classification = "Sobrepeso";
|
295 |
+
statusColor = "text-orange-600";
|
296 |
+
iconClass = "fas fa-exclamation-triangle text-orange-500";
|
297 |
+
icon = "⚠️";
|
298 |
+
} else if (roundedImc >= 30 && roundedImc < 35) {
|
299 |
+
classification = "Obesidade Grau I";
|
300 |
+
statusColor = "text-red-600";
|
301 |
+
iconClass = "fas fa-times-circle text-red-500 pulse";
|
302 |
+
icon = "❌";
|
303 |
+
} else if (roundedImc >= 35 && roundedImc < 40) {
|
304 |
+
classification = "Obesidade Grau II";
|
305 |
+
statusColor = "text-red-700";
|
306 |
+
iconClass = "fas fa-times-circle text-red-600 pulse";
|
307 |
+
icon = "❌";
|
308 |
+
} else {
|
309 |
+
classification = "Obesidade Grau III";
|
310 |
+
statusColor = "text-red-800";
|
311 |
+
iconClass = "fas fa-skull-crossbones text-red-700 pulse";
|
312 |
+
icon = "💀";
|
313 |
+
}
|
314 |
+
|
315 |
+
// Set progress bar color
|
316 |
+
document.getElementById('progressFill').className = `progress-fill ${statusColor.replace('text-', 'bg-')}`;
|
317 |
+
|
318 |
+
// Update classification display
|
319 |
+
document.getElementById('statusIcon').className = iconClass;
|
320 |
+
document.getElementById('statusTitle').className = `text-xl font-semibold mb-1 ${statusColor}`;
|
321 |
+
document.getElementById('statusTitle').textContent = classification;
|
322 |
+
|
323 |
+
let description = "";
|
324 |
+
if (roundedImc < 18.5) {
|
325 |
+
description = "Seu peso está abaixo do ideal para sua altura. Isso pode indicar desnutrição ou outros problemas de saúde.";
|
326 |
+
} else if (roundedImc < 25) {
|
327 |
+
description = "Parabéns! Seu peso está dentro da faixa considerada saudável para sua altura.";
|
328 |
+
} else if (roundedImc < 30) {
|
329 |
+
description = "Você está com sobrepeso. Isso aumenta o risco de desenvolver problemas de saúde.";
|
330 |
+
} else {
|
331 |
+
description = "Você está na faixa de obesidade. Isso representa um risco significativo para sua saúde.";
|
332 |
+
}
|
333 |
+
|
334 |
+
document.getElementById('statusDescription').textContent = description;
|
335 |
+
|
336 |
+
// Show health risks if outside normal range
|
337 |
+
const healthRisksElement = document.getElementById('healthRisks');
|
338 |
+
const risksListElement = document.getElementById('risksList');
|
339 |
+
|
340 |
+
if (roundedImc < 18.5 || roundedImc >= 25) {
|
341 |
+
healthRisksElement.classList.remove('hidden');
|
342 |
+
risksListElement.innerHTML = '';
|
343 |
+
|
344 |
+
const risks = [];
|
345 |
+
|
346 |
+
if (roundedImc < 18.5) {
|
347 |
+
risks.push(
|
348 |
+
"Desnutrição e deficiências nutricionais",
|
349 |
+
"Osteoporose e fraturas ósseas",
|
350 |
+
"Sistema imunológico enfraquecido",
|
351 |
+
"Problemas de crescimento (em jovens)",
|
352 |
+
"Infertilidade e irregularidades menstruais"
|
353 |
+
);
|
354 |
+
} else if (roundedImc >= 25 && roundedImc < 30) {
|
355 |
+
risks.push(
|
356 |
+
"Aumento do risco de doenças cardíacas",
|
357 |
+
"Maior chance de desenvolver diabetes tipo 2",
|
358 |
+
"Pressão arterial elevada",
|
359 |
+
"Problemas articulares e artrite",
|
360 |
+
"Apneia do sono e problemas respiratórios"
|
361 |
+
);
|
362 |
+
} else if (roundedImc >= 30) {
|
363 |
+
risks.push(
|
364 |
+
"Risco muito alto de doenças cardiovasculares",
|
365 |
+
"Diabetes tipo 2 e resistência à insulina",
|
366 |
+
"Pressão arterial perigosamente alta",
|
367 |
+
"Maior chance de certos tipos de câncer",
|
368 |
+
"Problemas graves nas articulações e mobilidade reduzida",
|
369 |
+
"Depressão e baixa autoestima",
|
370 |
+
"Expectativa de vida reduzida"
|
371 |
+
);
|
372 |
+
}
|
373 |
+
|
374 |
+
risks.forEach(risk => {
|
375 |
+
const li = document.createElement('p');
|
376 |
+
li.className = 'flex items-start';
|
377 |
+
li.innerHTML = `<span class="mr-2">•</span> ${risk}`;
|
378 |
+
risksListElement.appendChild(li);
|
379 |
+
});
|
380 |
+
} else {
|
381 |
+
healthRisksElement.classList.add('hidden');
|
382 |
+
}
|
383 |
+
|
384 |
+
// Show recommendations
|
385 |
+
const recommendationsListElement = document.getElementById('recommendationsList');
|
386 |
+
recommendationsListElement.innerHTML = '';
|
387 |
+
|
388 |
+
const recommendations = [];
|
389 |
+
|
390 |
+
if (roundedImc < 18.5) {
|
391 |
+
recommendations.push(
|
392 |
+
"Consulte um nutricionista para desenvolver um plano alimentar adequado",
|
393 |
+
"Aumente gradualmente a ingestão de alimentos nutritivos e calóricos",
|
394 |
+
"Inclua proteínas, carboidratos complexos e gorduras saudáveis em cada refeição",
|
395 |
+
"Pratique exercícios de força para ganhar massa muscular",
|
396 |
+
"Evite pular refeições e faça pequenos lanches entre as refeições principais"
|
397 |
+
);
|
398 |
+
} else if (roundedImc < 25) {
|
399 |
+
recommendations.push(
|
400 |
+
"Mantenha seus hábitos saudáveis de alimentação e exercícios",
|
401 |
+
"Continue monitorando seu peso regularmente",
|
402 |
+
"Varie sua dieta para obter todos os nutrientes necessários",
|
403 |
+
"Pratique atividades físicas regularmente para manter sua saúde",
|
404 |
+
"Durma bem e gerencie o estresse para manter o equilíbrio"
|
405 |
+
);
|
406 |
+
} else {
|
407 |
+
recommendations.push(
|
408 |
+
"Consulte um médico ou nutricionista para orientação personalizada",
|
409 |
+
"Reduza gradualmente a ingestão de calorias, focando em alimentos nutritivos",
|
410 |
+
"Aumente sua atividade física diária (comece com caminhadas se necessário)",
|
411 |
+
"Reduza o consumo de alimentos processados, açúcares e gorduras saturadas",
|
412 |
+
"Estabeleça metas realistas de perda de peso (0,5-1kg por semana)",
|
413 |
+
"Mantenha um diário alimentar para acompanhar seus progressos",
|
414 |
+
"Busque apoio de grupos ou profissionais para manter a motivação"
|
415 |
+
);
|
416 |
+
}
|
417 |
+
|
418 |
+
recommendations.forEach(rec => {
|
419 |
+
const li = document.createElement('p');
|
420 |
+
li.className = 'flex items-start';
|
421 |
+
li.innerHTML = `<span class="mr-2">•</span> ${rec}`;
|
422 |
+
recommendationsListElement.appendChild(li);
|
423 |
+
});
|
424 |
+
|
425 |
+
// Show result box with animation
|
426 |
+
document.getElementById('resultBox').classList.add('show');
|
427 |
+
|
428 |
+
// Scroll to results
|
429 |
+
document.getElementById('resultBox').scrollIntoView({ behavior: 'smooth' });
|
430 |
+
});
|
431 |
+
</script>
|
432 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ricardosantis/projetos" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
433 |
+
</html>
|
prompts.txt
ADDED
File without changes
|