luisgiam commited on
Commit
c8ad054
·
verified ·
1 Parent(s): 6caa05d

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +5 -3
  2. index.html +248 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: C Digo Biol Gico Sna
3
- emoji: 🌖
4
  colorFrom: green
5
  colorTo: purple
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: c-digo-biol-gico-sna
3
+ emoji: 🐳
4
  colorFrom: green
5
  colorTo: purple
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,248 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="es">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Test de Sistema Nervioso Autónomo</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
+ .fade-in {
11
+ animation: fadeIn 0.5s ease-in-out;
12
+ }
13
+ @keyframes fadeIn {
14
+ from { opacity: 0; transform: translateY(10px); }
15
+ to { opacity: 1; transform: translateY(0); }
16
+ }
17
+ .pulse {
18
+ animation: pulse 2s infinite;
19
+ }
20
+ @keyframes pulse {
21
+ 0% { transform: scale(1); }
22
+ 50% { transform: scale(1.05); }
23
+ 100% { transform: scale(1); }
24
+ }
25
+ .progress-bar {
26
+ transition: width 0.5s ease-in-out;
27
+ }
28
+ </style>
29
+ </head>
30
+ <body class="bg-gradient-to-br from-blue-50 to-indigo-100 min-h-screen font-sans">
31
+ <div class="container mx-auto px-4 py-12 max-w-3xl">
32
+ <!-- Header -->
33
+ <header class="text-center mb-12 fade-in">
34
+ <div class="bg-white rounded-full p-4 shadow-lg inline-block mb-6">
35
+ <i class="fas fa-brain text-4xl text-indigo-600"></i>
36
+ </div>
37
+ <h1 class="text-3xl md:text-4xl font-bold text-gray-800 mb-2">Test de Sistema Nervioso Autónomo</h1>
38
+ <p class="text-gray-600 max-w-lg mx-auto">Descubre si tu sistema nervioso tiene tendencia simpática o parasimpática respondiendo estas 5 preguntas</p>
39
+ </header>
40
+
41
+ <!-- Progress Bar -->
42
+ <div class="bg-white rounded-full h-4 mb-8 shadow-inner overflow-hidden fade-in">
43
+ <div id="progress" class="progress-bar h-full bg-gradient-to-r from-indigo-400 to-purple-500 rounded-full" style="width: 0%"></div>
44
+ </div>
45
+
46
+ <!-- Test Container -->
47
+ <div id="test-container" class="bg-white rounded-xl shadow-lg overflow-hidden fade-in">
48
+ <!-- Question Screen -->
49
+ <div id="question-screen">
50
+ <div class="p-6 md:p-8">
51
+ <h2 id="question-number" class="text-sm font-semibold text-indigo-600 mb-1">Pregunta 1 de 5</h2>
52
+ <h3 id="question-text" class="text-xl md:text-2xl font-bold text-gray-800 mb-6"></h3>
53
+
54
+ <div class="space-y-4 mb-8">
55
+ <button onclick="answerQuestion(true)" class="answer-btn w-full py-4 px-6 rounded-lg bg-gradient-to-r from-red-500 to-pink-500 text-white font-semibold text-lg shadow-md hover:shadow-lg transform hover:-translate-y-1 transition-all duration-200 flex items-center justify-center">
56
+ <i class="fas fa-check-circle mr-3"></i> Sí
57
+ </button>
58
+ <button onclick="answerQuestion(false)" class="answer-btn w-full py-4 px-6 rounded-lg bg-gradient-to-r from-green-500 to-teal-500 text-white font-semibold text-lg shadow-md hover:shadow-lg transform hover:-translate-y-1 transition-all duration-200 flex items-center justify-center">
59
+ <i class="fas fa-times-circle mr-3"></i> No
60
+ </button>
61
+ </div>
62
+
63
+ <p id="question-note" class="text-sm text-gray-500 italic"></p>
64
+ </div>
65
+ </div>
66
+
67
+ <!-- Results Screen (Hidden Initially) -->
68
+ <div id="results-screen" class="hidden p-6 md:p-8 text-center">
69
+ <div id="sympathetic-result" class="hidden">
70
+ <div class="bg-red-50 border border-red-200 rounded-xl p-6 mb-6">
71
+ <div class="w-20 h-20 bg-red-100 rounded-full flex items-center justify-center mx-auto mb-4">
72
+ <i class="fas fa-bolt text-red-500 text-3xl"></i>
73
+ </div>
74
+ <h2 class="text-2xl font-bold text-red-600 mb-2">Predominio Simpático</h2>
75
+ <p class="text-gray-700 mb-4">Tu sistema nervioso autónomo muestra tendencia hacia el sistema simpático.</p>
76
+ <div class="bg-white p-4 rounded-lg border border-red-100 text-left">
77
+ <h3 class="font-semibold text-red-500 mb-2">Características:</h3>
78
+ <ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
79
+ <li>Mayor actividad de "lucha o huida"</li>
80
+ <li>Posible dificultad en la digestión de ciertos alimentos</li>
81
+ <li>Mayor sensibilidad a interrupciones del sueño</li>
82
+ <li>Metabolismo más acelerado</li>
83
+ </ul>
84
+ </div>
85
+ </div>
86
+ </div>
87
+
88
+ <div id="parasympathetic-result" class="hidden">
89
+ <div class="bg-green-50 border border-green-200 rounded-xl p-6 mb-6">
90
+ <div class="w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-4">
91
+ <i class="fas fa-leaf text-green-500 text-3xl"></i>
92
+ </div>
93
+ <h2 class="text-2xl font-bold text-green-600 mb-2">Predominio Parasimpático</h2>
94
+ <p class="text-gray-700 mb-4">Tu sistema nervioso autónomo muestra tendencia hacia el sistema parasimpático.</p>
95
+ <div class="bg-white p-4 rounded-lg border border-green-100 text-left">
96
+ <h3 class="font-semibold text-green-500 mb-2">Características:</h3>
97
+ <ul class="list-disc list-inside text-sm text-gray-600 space-y-1">
98
+ <li>Mayor actividad de "descanso y digestión"</li>
99
+ <li>Buena tolerancia digestiva</li>
100
+ <li>Sueño menos interrumpido</li>
101
+ <li>Metabolismo más equilibrado</li>
102
+ </ul>
103
+ </div>
104
+ </div>
105
+ </div>
106
+
107
+ <button onclick="restartTest()" class="mt-6 py-3 px-6 bg-indigo-600 text-white font-semibold rounded-lg shadow-md hover:bg-indigo-700 transition-colors duration-200 inline-flex items-center">
108
+ <i class="fas fa-redo mr-2"></i> Realizar otro test
109
+ </button>
110
+ </div>
111
+ </div>
112
+
113
+ <!-- Info Section -->
114
+ <div class="mt-12 bg-white bg-opacity-70 backdrop-blur-sm rounded-xl p-6 shadow-sm fade-in">
115
+ <h2 class="text-xl font-bold text-gray-800 mb-4 flex items-center">
116
+ <i class="fas fa-info-circle text-indigo-500 mr-2"></i> Sobre el sistema nervioso autónomo
117
+ </h2>
118
+ <div class="grid md:grid-cols-2 gap-6">
119
+ <div class="bg-indigo-50 p-4 rounded-lg border border-indigo-100">
120
+ <h3 class="font-semibold text-indigo-700 mb-2 flex items-center">
121
+ <i class="fas fa-bolt text-indigo-500 mr-2"></i> Sistema Simpático
122
+ </h3>
123
+ <p class="text-sm text-gray-600">Se activa en situaciones de estrés o alerta, preparando el cuerpo para la acción (respuesta de "lucha o huida"). Aumenta el ritmo cardíaco, dilata las pupilas y reduce la digestión.</p>
124
+ </div>
125
+ <div class="bg-green-50 p-4 rounded-lg border border-green-100">
126
+ <h3 class="font-semibold text-green-700 mb-2 flex items-center">
127
+ <i class="fas fa-leaf text-green-500 mr-2"></i> Sistema Parasimpático
128
+ </h3>
129
+ <p class="text-sm text-gray-600">Promueve la relajación y procesos de recuperación ("descanso y digestión"). Disminuye el ritmo cardíaco, contrae las pupilas y estimula la digestión y el sueño.</p>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <script>
136
+ // Questions data
137
+ const questions = [
138
+ {
139
+ text: "Cuando comes carne roja (vaca/res, cerdo o cordero, conejo, cabrito) ¿No digiere bien o tarda en digerirla? ¿Te caen mal de vez en cuando?",
140
+ note: "(Tu respuesta por el 'Sí' puede ser eventual o que siempre te suceda)"
141
+ },
142
+ {
143
+ text: "Cuando comes tarde de noche, antes de dormir… ¿Tienes dificultad para digerir?",
144
+ note: "(Tu respuesta por el 'Sí' puede ser eventual o que siempre te suceda)"
145
+ },
146
+ {
147
+ text: "Si comes cosas grasosas: manteca/mantequilla, pasta de maní, quesos amarillos, carnes grasosas o aceites o alimentos fritos. ¿Te caen pesadas?",
148
+ note: "(Tu respuesta por el 'Sí' puede ser eventual o que siempre te suceda)"
149
+ },
150
+ {
151
+ text: "Si comes tarde, en la noche, antes de irte a dormir. ¿Eso te impide un buen sueño y descanso?",
152
+ note: "(Tu respuesta por el 'Sí' puede ser eventual o que siempre te suceda)"
153
+ },
154
+ {
155
+ text: "Durante tu dormir, tu sueño (NO EL SOÑAR). ¿Te despiertas por cualquier suceso propio o ajeno, interior o exterior a vos, como ruidos?",
156
+ note: "(Tu respuesta por el 'Sí' puede ser eventual o que siempre te suceda)"
157
+ }
158
+ ];
159
+
160
+ // Test state
161
+ let currentQuestion = 0;
162
+ let answers = [];
163
+
164
+ // DOM elements
165
+ const questionText = document.getElementById('question-text');
166
+ const questionNote = document.getElementById('question-note');
167
+ const questionNumber = document.getElementById('question-number');
168
+ const progressBar = document.getElementById('progress');
169
+ const questionScreen = document.getElementById('question-screen');
170
+ const resultsScreen = document.getElementById('results-screen');
171
+ const sympatheticResult = document.getElementById('sympathetic-result');
172
+ const parasympatheticResult = document.getElementById('parasympathetic-result');
173
+
174
+ // Initialize the test
175
+ function initTest() {
176
+ currentQuestion = 0;
177
+ answers = [];
178
+ updateQuestion();
179
+ questionScreen.classList.remove('hidden');
180
+ resultsScreen.classList.add('hidden');
181
+ }
182
+
183
+ // Update the current question display
184
+ function updateQuestion() {
185
+ if (currentQuestion < questions.length) {
186
+ questionText.textContent = questions[currentQuestion].text;
187
+ questionNote.textContent = questions[currentQuestion].note;
188
+ questionNumber.textContent = `Pregunta ${currentQuestion + 1} de ${questions.length}`;
189
+ progressBar.style.width = `${(currentQuestion / questions.length) * 100}%`;
190
+ } else {
191
+ showResults();
192
+ }
193
+ }
194
+
195
+ // Handle answer selection
196
+ function answerQuestion(answer) {
197
+ answers.push(answer);
198
+ currentQuestion++;
199
+
200
+ // Add animation to buttons
201
+ const buttons = document.querySelectorAll('.answer-btn');
202
+ buttons.forEach(btn => {
203
+ btn.classList.add('opacity-50', 'cursor-not-allowed');
204
+ setTimeout(() => {
205
+ btn.classList.remove('opacity-50', 'cursor-not-allowed');
206
+ }, 500);
207
+ });
208
+
209
+ setTimeout(() => {
210
+ updateQuestion();
211
+ }, 300);
212
+ }
213
+
214
+ // Show test results
215
+ function showResults() {
216
+ // Calculate result (if any 'true' answer, sympathetic; else parasympathetic)
217
+ const hasSympatheticTendency = answers.includes(true);
218
+
219
+ questionScreen.classList.add('hidden');
220
+ resultsScreen.classList.remove('hidden');
221
+
222
+ if (hasSympatheticTendency) {
223
+ sympatheticResult.classList.remove('hidden');
224
+ sympatheticResult.classList.add('pulse');
225
+ } else {
226
+ parasympatheticResult.classList.remove('hidden');
227
+ parasympatheticResult.classList.add('pulse');
228
+ }
229
+
230
+ // Complete progress bar
231
+ progressBar.style.width = '100%';
232
+ }
233
+
234
+ // Restart the test
235
+ function restartTest() {
236
+ sympatheticResult.classList.add('hidden');
237
+ parasympatheticResult.classList.add('hidden');
238
+ sympatheticResult.classList.remove('pulse');
239
+ parasympatheticResult.classList.remove('pulse');
240
+
241
+ initTest();
242
+ }
243
+
244
+ // Start the test when page loads
245
+ window.onload = initTest;
246
+ </script>
247
+ <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=luisgiam/c-digo-biol-gico-sna" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
248
+ </html>
prompts.txt ADDED
File without changes