tufonoayuda commited on
Commit
2fbf702
·
verified ·
1 Parent(s): 257a6c5

Create index.html

Browse files
Files changed (1) hide show
  1. index.html +196 -0
index.html ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Generador de Actividades Fonoaudiológicas | DeepSeek</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://unpkg.com/lucide-react@latest/dist/umd/lucide-react.js"></script>
9
+ <style>
10
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
11
+
12
+ * {
13
+ box-sizing: border-box;
14
+ margin: 0;
15
+ padding: 0;
16
+ }
17
+
18
+ body {
19
+ font-family: 'Inter', sans-serif;
20
+ background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
21
+ min-height: 100vh;
22
+ }
23
+
24
+ .deepseek-gradient {
25
+ background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
26
+ }
27
+
28
+ .glass {
29
+ background: rgba(255, 255, 255, 0.7);
30
+ backdrop-filter: blur(10px);
31
+ border: 1px solid rgba(255, 255, 255, 0.2);
32
+ }
33
+
34
+ .loading-spinner {
35
+ border: 2px solid #f3f3f3;
36
+ border-top: 2px solid #3b82f6;
37
+ border-radius: 50%;
38
+ width: 20px;
39
+ height: 20px;
40
+ animation: spin 1s linear infinite;
41
+ }
42
+
43
+ @keyframes spin {
44
+ 0% { transform: rotate(0deg); }
45
+ 100% { transform: rotate(360deg); }
46
+ }
47
+
48
+ .fade-in {
49
+ animation: fadeIn 0.5s ease-in;
50
+ }
51
+
52
+ @keyframes fadeIn {
53
+ from { opacity: 0; }
54
+ to { opacity: 1; }
55
+ }
56
+
57
+ .result-section {
58
+ max-height: calc(100vh - 150px);
59
+ overflow-y: auto;
60
+ }
61
+
62
+ @media (max-width: 1024px) {
63
+ .main-grid {
64
+ grid-template-columns: 1fr !important;
65
+ }
66
+
67
+ .result-section {
68
+ max-height: none;
69
+ }
70
+ }
71
+ </style>
72
+ </head>
73
+ <body class="bg-gray-100 min-h-screen">
74
+ <div id="root" class="max-w-7xl mx-auto px-4 py-8"></div>
75
+
76
+ <script type="text/babel">
77
+ const { useState, useCallback } = React;
78
+ const { FileText, User, Target, Clock, Users, Settings, BookOpen, Download, Sparkles, ChevronDown, ChevronUp, Upload, X, FileCheck, Brain } = LucideReact;
79
+
80
+ const SpeechTherapyGenerator = () => {
81
+ const [formData, setFormData] = useState({
82
+ userDescription: '',
83
+ specificObjective: '',
84
+ duration: '',
85
+ sessionType: 'individual',
86
+ isPediatric: false,
87
+ additionalContext: {
88
+ customContext: ''
89
+ },
90
+ references: []
91
+ });
92
+
93
+ const [generatedActivity, setGeneratedActivity] = useState(null);
94
+ const [isGenerating, setIsGenerating] = useState(false);
95
+ const [showAdvanced, setShowAdvanced] = useState(false);
96
+ const [uploadedFiles, setUploadedFiles] = useState([]);
97
+
98
+ const bloomLevels = [
99
+ { level: 'Recordar', description: 'Reconocer, listar, describir, identificar' },
100
+ { level: 'Comprender', description: 'Interpretar, resumir, inferir, parafrasear' },
101
+ { level: 'Aplicar', description: 'Ejecutar, implementar, demostrar, utilizar' },
102
+ { level: 'Analizar', description: 'Diferenciar, organizar, relacionar, comparar' },
103
+ { level: 'Evaluar', description: 'Revisar, formular hipótesis, criticar, experimentar' },
104
+ { level: 'Crear', description: 'Generar, planear, producir, diseñar' }
105
+ ];
106
+
107
+ const handleInputChange = (field, value) => {
108
+ if (field.includes('.')) {
109
+ const [parent, child] = field.split('.');
110
+ setFormData(prev => ({
111
+ ...prev,
112
+ [parent]: {
113
+ ...prev[parent],
114
+ [child]: value
115
+ }
116
+ }));
117
+ } else {
118
+ setFormData(prev => ({
119
+ ...prev,
120
+ [field]: value
121
+ }));
122
+ }
123
+ };
124
+
125
+ const handleFileUpload = useCallback((event) => {
126
+ const files = Array.from(event.target.files);
127
+ const validFiles = files.filter(file =>
128
+ file.type === 'application/pdf' && file.size <= 50 * 1024 * 1024
129
+ );
130
+
131
+ if (validFiles.length !== files.length) {
132
+ alert('Solo se permiten archivos PDF con un tamaño máximo de 50MB');
133
+ }
134
+
135
+ setUploadedFiles(prev => [...prev, ...validFiles]);
136
+ setFormData(prev => ({
137
+ ...prev,
138
+ references: [...prev.references, ...validFiles]
139
+ }));
140
+ }, []);
141
+
142
+ const removeFile = (index) => {
143
+ setUploadedFiles(prev => prev.filter((_, i) => i !== index));
144
+ setFormData(prev => ({
145
+ ...prev,
146
+ references: prev.references.filter((_, i) => i !== index)
147
+ }));
148
+ };
149
+
150
+ const generateSMARTObjective = (objective, age, duration) => {
151
+ const ageGroup = age < 36 ? 'preescolar' : age < 144 ? 'escolar' : 'adolescente/adulto';
152
+ const timeFrame = duration < 30 ? 'corto plazo' : duration < 60 ? 'mediano plazo' : 'largo plazo';
153
+
154
+ return `El paciente ${ageGroup} logrará ${objective} con un 80% de precisión durante ${duration} minutos, utilizando apoyo visual/auditivo según necesidad, medible a través de registro de respuestas correctas en ${timeFrame}.`;
155
+ };
156
+
157
+ const analyzeAdditionalContext = (contextText) => {
158
+ if (!contextText) return {};
159
+
160
+ const context = contextText.toLowerCase();
161
+ const info = {};
162
+
163
+ // Extraer tipo de material de forma más flexible
164
+ const materialKeywords = {
165
+ 'visual': ['tarjetas visuales', 'imágenes', 'pictogramas', 'láminas', 'fotos', 'dibujos', 'visual'],
166
+ 'auditivo': ['grabaciones', 'música', 'sonidos', 'audio', 'canciones', 'melodías', 'auditivo'],
167
+ 'táctil': ['texturas', 'objetos', 'táctil', 'manipulativo', 'concreto', 'palpar', 'tocar'],
168
+ 'digital': ['aplicaciones', 'apps', 'tablet', 'computadora', 'software', 'digital', 'tecnología', 'dispositivo']
169
+ };
170
+
171
+ for (const [type, keywords] of Object.entries(materialKeywords)) {
172
+ if (keywords.some(keyword => context.includes(keyword))) {
173
+ info.materialType = type;
174
+ // Extraer detalles específicos del material
175
+ const materialMatch = contextText.match(new RegExp(`(${keywords.join('|')}).{0,30}`, 'i'));
176
+ if (materialMatch) info.materialDetails = materialMatch[0];
177
+ break;
178
+ }
179
+ }
180
+
181
+ // Extraer estrategia de intervención de forma más flexible
182
+ const strategyKeywords = {
183
+ 'Terapia Miofuncional': ['miofuncional', 'orofacial', 'muscular oral'],
184
+ 'Método Bobath': ['bobath', 'neurodesarrollo', 'neuromotor'],
185
+ 'Prompt': ['prompt', 'táctil-kinestésico', 'apoyo táctil'],
186
+ 'Melodic Intonation Therapy': ['melodic intonation', 'mit', 'terapia melódica', 'entonación melódica'],
187
+ 'Lee Silverman Voice Treatment': ['lsvt', 'lee silverman', 'voz fuerte', 'parkinson'],
188
+ 'Comunicación Total': ['comunicación total', 'multimodal', 'signos'],
189
+ 'Sistemas Aumentativos': ['saac', 'aumentativo', 'alternativo', 'comunicación aumentativa'],
190
+ 'VitalStim': ['vitalstim', 'estimulación eléctrica', 'disfagia'],
191
+ 'Terapia de Ritmo': ['ritmo', 'melodía', 'musical', 'rítmica'],
192
+ 'Método Multisensorial': ['multisensorial', 'varios sentidos', 'integración sensorial']
193
+ };
194
+
195
+ for (const [strategy, keywords] of Object.entries(strategyKeywords)) {
196
+ if