Spaces:
Running
Running
can you generate an interface that would provide troubleshooting recommendations based on the symptoms you provide for a particular kind of equipment i put for example a car a jet engine some computer systems etc - Initial Deployment
Browse files- README.md +6 -4
- index.html +507 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: yellow
|
| 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: personal-project
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
colorTo: yellow
|
| 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,507 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Equipment Troubleshooting Assistant</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 |
+
|
| 14 |
+
@keyframes fadeIn {
|
| 15 |
+
from { opacity: 0; transform: translateY(10px); }
|
| 16 |
+
to { opacity: 1; transform: translateY(0); }
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
.equipment-card:hover {
|
| 20 |
+
transform: translateY(-5px);
|
| 21 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.symptom-chip {
|
| 25 |
+
transition: all 0.2s ease;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
.symptom-chip:hover {
|
| 29 |
+
background-color: #3b82f6;
|
| 30 |
+
color: white;
|
| 31 |
+
}
|
| 32 |
+
</style>
|
| 33 |
+
</head>
|
| 34 |
+
<body class="bg-gray-50 min-h-screen">
|
| 35 |
+
<div class="container mx-auto px-4 py-8">
|
| 36 |
+
<!-- Header -->
|
| 37 |
+
<header class="text-center mb-12">
|
| 38 |
+
<h1 class="text-4xl font-bold text-blue-800 mb-2">Equipment Troubleshooting Assistant</h1>
|
| 39 |
+
<p class="text-gray-600 max-w-2xl mx-auto">Get expert troubleshooting recommendations based on the symptoms you observe in your equipment</p>
|
| 40 |
+
</header>
|
| 41 |
+
|
| 42 |
+
<!-- Main Content -->
|
| 43 |
+
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
|
| 44 |
+
<!-- Equipment Selection -->
|
| 45 |
+
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-1">
|
| 46 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">1. Select Equipment Type</h2>
|
| 47 |
+
|
| 48 |
+
<div class="space-y-4">
|
| 49 |
+
<div class="equipment-card bg-white border border-gray-200 rounded-lg p-4 cursor-pointer transition-all duration-300"
|
| 50 |
+
data-equipment="car" onclick="selectEquipment(this, 'car')">
|
| 51 |
+
<div class="flex items-center">
|
| 52 |
+
<i class="fas fa-car text-blue-500 text-2xl mr-3"></i>
|
| 53 |
+
<div>
|
| 54 |
+
<h3 class="font-medium">Automobile</h3>
|
| 55 |
+
<p class="text-sm text-gray-500">Cars, trucks, motorcycles</p>
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
|
| 60 |
+
<div class="equipment-card bg-white border border-gray-200 rounded-lg p-4 cursor-pointer transition-all duration-300"
|
| 61 |
+
data-equipment="jet-engine" onclick="selectEquipment(this, 'jet-engine')">
|
| 62 |
+
<div class="flex items-center">
|
| 63 |
+
<i class="fas fa-plane text-blue-500 text-2xl mr-3"></i>
|
| 64 |
+
<div>
|
| 65 |
+
<h3 class="font-medium">Jet Engine</h3>
|
| 66 |
+
<p class="text-sm text-gray-500">Aircraft propulsion systems</p>
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
</div>
|
| 70 |
+
|
| 71 |
+
<div class="equipment-card bg-white border border-gray-200 rounded-lg p-4 cursor-pointer transition-all duration-300"
|
| 72 |
+
data-equipment="computer" onclick="selectEquipment(this, 'computer')">
|
| 73 |
+
<div class="flex items-center">
|
| 74 |
+
<i class="fas fa-laptop text-blue-500 text-2xl mr-3"></i>
|
| 75 |
+
<div>
|
| 76 |
+
<h3 class="font-medium">Computer System</h3>
|
| 77 |
+
<p class="text-sm text-gray-500">PCs, servers, networking</p>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
|
| 82 |
+
<div class="equipment-card bg-white border border-gray-200 rounded-lg p-4 cursor-pointer transition-all duration-300"
|
| 83 |
+
data-equipment="medical" onclick="selectEquipment(this, 'medical')">
|
| 84 |
+
<div class="flex items-center">
|
| 85 |
+
<i class="fas fa-heartbeat text-blue-500 text-2xl mr-3"></i>
|
| 86 |
+
<div>
|
| 87 |
+
<h3 class="font-medium">Medical Equipment</h3>
|
| 88 |
+
<p class="text-sm text-gray-500">Diagnostic machines, monitors</p>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div class="equipment-card bg-white border border-gray-200 rounded-lg p-4 cursor-pointer transition-all duration-300"
|
| 94 |
+
data-equipment="industrial" onclick="selectEquipment(this, 'industrial')">
|
| 95 |
+
<div class="flex items-center">
|
| 96 |
+
<i class="fas fa-industry text-blue-500 text-2xl mr-3"></i>
|
| 97 |
+
<div>
|
| 98 |
+
<h3 class="font-medium">Industrial Machinery</h3>
|
| 99 |
+
<p class="text-sm text-gray-500">Manufacturing equipment</p>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
|
| 106 |
+
<!-- Symptoms Input -->
|
| 107 |
+
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-1">
|
| 108 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">2. Describe Symptoms</h2>
|
| 109 |
+
|
| 110 |
+
<div id="equipment-info" class="hidden mb-4 p-3 bg-blue-50 rounded-lg">
|
| 111 |
+
<h3 class="font-medium text-blue-800" id="selected-equipment-name"></h3>
|
| 112 |
+
<p class="text-sm text-blue-600" id="selected-equipment-desc"></p>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
<div class="mb-4">
|
| 116 |
+
<label class="block text-gray-700 text-sm font-medium mb-2" for="symptoms">
|
| 117 |
+
What symptoms are you observing?
|
| 118 |
+
</label>
|
| 119 |
+
<textarea id="symptoms" rows="4"
|
| 120 |
+
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
|
| 121 |
+
placeholder="Describe the symptoms in detail..."></textarea>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<div class="mb-6">
|
| 125 |
+
<label class="block text-gray-700 text-sm font-medium mb-2">
|
| 126 |
+
Common symptoms (click to add):
|
| 127 |
+
</label>
|
| 128 |
+
<div id="common-symptoms" class="flex flex-wrap gap-2">
|
| 129 |
+
<!-- Will be populated by JavaScript -->
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<button id="analyze-btn" onclick="analyzeSymptoms()"
|
| 134 |
+
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4 rounded-md transition duration-300 disabled:opacity-50 disabled:cursor-not-allowed"
|
| 135 |
+
disabled>
|
| 136 |
+
<i class="fas fa-search mr-2"></i> Analyze Symptoms
|
| 137 |
+
</button>
|
| 138 |
+
</div>
|
| 139 |
+
|
| 140 |
+
<!-- Results Panel -->
|
| 141 |
+
<div class="bg-white rounded-xl shadow-md p-6 lg:col-span-1">
|
| 142 |
+
<h2 class="text-xl font-semibold text-gray-800 mb-4">3. Troubleshooting Recommendations</h2>
|
| 143 |
+
|
| 144 |
+
<div id="results-placeholder" class="text-center py-12">
|
| 145 |
+
<i class="fas fa-tools text-gray-300 text-5xl mb-4"></i>
|
| 146 |
+
<p class="text-gray-500">Select equipment and describe symptoms to get troubleshooting recommendations</p>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<div id="results-container" class="hidden">
|
| 150 |
+
<div class="flex justify-between items-center mb-4">
|
| 151 |
+
<h3 class="font-medium text-lg" id="results-title"></h3>
|
| 152 |
+
<button onclick="resetForm()" class="text-blue-600 hover:text-blue-800 text-sm">
|
| 153 |
+
<i class="fas fa-redo mr-1"></i> Start Over
|
| 154 |
+
</button>
|
| 155 |
+
</div>
|
| 156 |
+
|
| 157 |
+
<div id="results-content" class="space-y-4">
|
| 158 |
+
<!-- Will be populated by JavaScript -->
|
| 159 |
+
</div>
|
| 160 |
+
</div>
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
</div>
|
| 164 |
+
|
| 165 |
+
<script>
|
| 166 |
+
// Equipment data
|
| 167 |
+
const equipmentData = {
|
| 168 |
+
'car': {
|
| 169 |
+
name: 'Automobile',
|
| 170 |
+
description: 'Cars, trucks, motorcycles and other vehicles',
|
| 171 |
+
commonSymptoms: [
|
| 172 |
+
'Engine won\'t start',
|
| 173 |
+
'Strange noises',
|
| 174 |
+
'Warning lights on',
|
| 175 |
+
'Poor fuel economy',
|
| 176 |
+
'Overheating',
|
| 177 |
+
'Brake problems',
|
| 178 |
+
'Electrical issues'
|
| 179 |
+
],
|
| 180 |
+
solutions: {
|
| 181 |
+
'Engine won\'t start': [
|
| 182 |
+
'Check battery connections and charge',
|
| 183 |
+
'Inspect starter motor and alternator',
|
| 184 |
+
'Verify fuel delivery system',
|
| 185 |
+
'Check ignition system (spark plugs, coils)'
|
| 186 |
+
],
|
| 187 |
+
'Strange noises': [
|
| 188 |
+
'Identify noise location (engine, suspension, exhaust)',
|
| 189 |
+
'Check for loose components',
|
| 190 |
+
'Inspect belts and pulleys',
|
| 191 |
+
'Look for exhaust leaks'
|
| 192 |
+
],
|
| 193 |
+
'Warning lights on': [
|
| 194 |
+
'Use OBD-II scanner to read error codes',
|
| 195 |
+
'Check vehicle manual for specific light meaning',
|
| 196 |
+
'Inspect relevant systems (engine, transmission, brakes)'
|
| 197 |
+
]
|
| 198 |
+
}
|
| 199 |
+
},
|
| 200 |
+
'jet-engine': {
|
| 201 |
+
name: 'Jet Engine',
|
| 202 |
+
description: 'Aircraft propulsion systems and turbines',
|
| 203 |
+
commonSymptoms: [
|
| 204 |
+
'Loss of thrust',
|
| 205 |
+
'Excessive vibration',
|
| 206 |
+
'High EGT (Exhaust Gas Temperature)',
|
| 207 |
+
'Oil pressure warning',
|
| 208 |
+
'Compressor stall',
|
| 209 |
+
'Fuel flow anomalies'
|
| 210 |
+
],
|
| 211 |
+
solutions: {
|
| 212 |
+
'Loss of thrust': [
|
| 213 |
+
'Check fuel system for proper flow',
|
| 214 |
+
'Inspect compressor and turbine blades for damage',
|
| 215 |
+
'Verify engine control system operation',
|
| 216 |
+
'Check for exhaust leaks'
|
| 217 |
+
],
|
| 218 |
+
'Excessive vibration': [
|
| 219 |
+
'Perform engine balance check',
|
| 220 |
+
'Inspect mounts and attachments',
|
| 221 |
+
'Check for foreign object damage',
|
| 222 |
+
'Monitor vibration during different power settings'
|
| 223 |
+
]
|
| 224 |
+
}
|
| 225 |
+
},
|
| 226 |
+
'computer': {
|
| 227 |
+
name: 'Computer System',
|
| 228 |
+
description: 'PCs, servers, networking equipment',
|
| 229 |
+
commonSymptoms: [
|
| 230 |
+
'Won\'t power on',
|
| 231 |
+
'Blue screen errors',
|
| 232 |
+
'Slow performance',
|
| 233 |
+
'Overheating',
|
| 234 |
+
'Network connectivity issues',
|
| 235 |
+
'Peripheral malfunctions'
|
| 236 |
+
],
|
| 237 |
+
solutions: {
|
| 238 |
+
'Won\'t power on': [
|
| 239 |
+
'Check power supply and connections',
|
| 240 |
+
'Test with known-good power cable',
|
| 241 |
+
'Inspect motherboard for visible damage',
|
| 242 |
+
'Reset CMOS battery'
|
| 243 |
+
],
|
| 244 |
+
'Slow performance': [
|
| 245 |
+
'Check task manager for resource hogs',
|
| 246 |
+
'Scan for malware/viruses',
|
| 247 |
+
'Verify adequate free disk space',
|
| 248 |
+
'Consider hardware upgrades if outdated'
|
| 249 |
+
]
|
| 250 |
+
}
|
| 251 |
+
},
|
| 252 |
+
'medical': {
|
| 253 |
+
name: 'Medical Equipment',
|
| 254 |
+
description: 'Diagnostic machines, monitors, and devices',
|
| 255 |
+
commonSymptoms: [
|
| 256 |
+
'Inaccurate readings',
|
| 257 |
+
'Device not powering on',
|
| 258 |
+
'Calibration errors',
|
| 259 |
+
'Sensor malfunctions',
|
| 260 |
+
'Communication failures',
|
| 261 |
+
'Alarm conditions'
|
| 262 |
+
],
|
| 263 |
+
solutions: {
|
| 264 |
+
'Inaccurate readings': [
|
| 265 |
+
'Perform calibration procedure',
|
| 266 |
+
'Check sensor connections and placement',
|
| 267 |
+
'Verify patient conditions match expected parameters',
|
| 268 |
+
'Inspect for environmental interference'
|
| 269 |
+
],
|
| 270 |
+
'Device not powering on': [
|
| 271 |
+
'Verify power source and connections',
|
| 272 |
+
'Check backup battery status',
|
| 273 |
+
'Inspect power supply components',
|
| 274 |
+
'Contact manufacturer for service if under warranty'
|
| 275 |
+
]
|
| 276 |
+
}
|
| 277 |
+
},
|
| 278 |
+
'industrial': {
|
| 279 |
+
name: 'Industrial Machinery',
|
| 280 |
+
description: 'Manufacturing and production equipment',
|
| 281 |
+
commonSymptoms: [
|
| 282 |
+
'Unexpected shutdowns',
|
| 283 |
+
'Excessive vibration',
|
| 284 |
+
'Hydraulic leaks',
|
| 285 |
+
'Pneumatic pressure drops',
|
| 286 |
+
'Control system errors',
|
| 287 |
+
'Bearing failures'
|
| 288 |
+
],
|
| 289 |
+
solutions: {
|
| 290 |
+
'Unexpected shutdowns': [
|
| 291 |
+
'Check error logs and fault codes',
|
| 292 |
+
'Inspect thermal protection devices',
|
| 293 |
+
'Verify power supply stability',
|
| 294 |
+
'Check for overload conditions'
|
| 295 |
+
],
|
| 296 |
+
'Hydraulic leaks': [
|
| 297 |
+
'Locate source of leak (hoses, fittings, cylinders)',
|
| 298 |
+
'Check hydraulic fluid levels',
|
| 299 |
+
'Inspect seals and O-rings',
|
| 300 |
+
'Verify system pressure within specifications'
|
| 301 |
+
]
|
| 302 |
+
}
|
| 303 |
+
}
|
| 304 |
+
};
|
| 305 |
+
|
| 306 |
+
let selectedEquipment = null;
|
| 307 |
+
|
| 308 |
+
// Select equipment
|
| 309 |
+
function selectEquipment(element, equipmentType) {
|
| 310 |
+
// Remove active class from all cards
|
| 311 |
+
document.querySelectorAll('.equipment-card').forEach(card => {
|
| 312 |
+
card.classList.remove('border-blue-500', 'bg-blue-50');
|
| 313 |
+
});
|
| 314 |
+
|
| 315 |
+
// Add active class to selected card
|
| 316 |
+
element.classList.add('border-blue-500', 'bg-blue-50');
|
| 317 |
+
|
| 318 |
+
// Set selected equipment
|
| 319 |
+
selectedEquipment = equipmentType;
|
| 320 |
+
|
| 321 |
+
// Show equipment info
|
| 322 |
+
document.getElementById('equipment-info').classList.remove('hidden');
|
| 323 |
+
document.getElementById('selected-equipment-name').textContent = equipmentData[equipmentType].name;
|
| 324 |
+
document.getElementById('selected-equipment-desc').textContent = equipmentData[equipmentType].description;
|
| 325 |
+
|
| 326 |
+
// Enable analyze button if symptoms are present
|
| 327 |
+
if (document.getElementById('symptoms').value.trim() !== '') {
|
| 328 |
+
document.getElementById('analyze-btn').disabled = false;
|
| 329 |
+
}
|
| 330 |
+
|
| 331 |
+
// Populate common symptoms
|
| 332 |
+
const symptomsContainer = document.getElementById('common-symptoms');
|
| 333 |
+
symptomsContainer.innerHTML = '';
|
| 334 |
+
|
| 335 |
+
equipmentData[equipmentType].commonSymptoms.forEach(symptom => {
|
| 336 |
+
const chip = document.createElement('div');
|
| 337 |
+
chip.className = 'symptom-chip bg-gray-100 text-gray-800 text-sm px-3 py-1 rounded-full cursor-pointer';
|
| 338 |
+
chip.textContent = symptom;
|
| 339 |
+
chip.onclick = function() {
|
| 340 |
+
addSymptomToTextarea(symptom);
|
| 341 |
+
};
|
| 342 |
+
symptomsContainer.appendChild(chip);
|
| 343 |
+
});
|
| 344 |
+
}
|
| 345 |
+
|
| 346 |
+
// Add symptom to textarea
|
| 347 |
+
function addSymptomToTextarea(symptom) {
|
| 348 |
+
const textarea = document.getElementById('symptoms');
|
| 349 |
+
const currentText = textarea.value.trim();
|
| 350 |
+
|
| 351 |
+
if (currentText === '') {
|
| 352 |
+
textarea.value = symptom;
|
| 353 |
+
} else {
|
| 354 |
+
// Check if symptom already exists
|
| 355 |
+
if (!currentText.includes(symptom)) {
|
| 356 |
+
textarea.value = currentText + ', ' + symptom;
|
| 357 |
+
}
|
| 358 |
+
}
|
| 359 |
+
|
| 360 |
+
// Enable analyze button if equipment is selected
|
| 361 |
+
if (selectedEquipment) {
|
| 362 |
+
document.getElementById('analyze-btn').disabled = false;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
// Trigger input event
|
| 366 |
+
textarea.dispatchEvent(new Event('input'));
|
| 367 |
+
}
|
| 368 |
+
|
| 369 |
+
// Listen for textarea input to enable/disable analyze button
|
| 370 |
+
document.getElementById('symptoms').addEventListener('input', function() {
|
| 371 |
+
if (selectedEquipment && this.value.trim() !== '') {
|
| 372 |
+
document.getElementById('analyze-btn').disabled = false;
|
| 373 |
+
} else {
|
| 374 |
+
document.getElementById('analyze-btn').disabled = true;
|
| 375 |
+
}
|
| 376 |
+
});
|
| 377 |
+
|
| 378 |
+
// Analyze symptoms
|
| 379 |
+
function analyzeSymptoms() {
|
| 380 |
+
const symptomsText = document.getElementById('symptoms').value.trim();
|
| 381 |
+
|
| 382 |
+
if (!selectedEquipment || symptomsText === '') return;
|
| 383 |
+
|
| 384 |
+
// Hide placeholder, show results
|
| 385 |
+
document.getElementById('results-placeholder').classList.add('hidden');
|
| 386 |
+
document.getElementById('results-container').classList.remove('hidden');
|
| 387 |
+
|
| 388 |
+
// Set results title
|
| 389 |
+
document.getElementById('results-title').textContent = `Troubleshooting ${equipmentData[selectedEquipment].name}`;
|
| 390 |
+
|
| 391 |
+
// Process symptoms and find matches
|
| 392 |
+
const resultsContainer = document.getElementById('results-content');
|
| 393 |
+
resultsContainer.innerHTML = '';
|
| 394 |
+
|
| 395 |
+
// Split symptoms by commas or other separators
|
| 396 |
+
const symptoms = symptomsText.split(/[,;]\s*|\s+and\s+/i).map(s => s.trim()).filter(s => s !== '');
|
| 397 |
+
|
| 398 |
+
// Find matching solutions
|
| 399 |
+
let foundSolutions = false;
|
| 400 |
+
|
| 401 |
+
symptoms.forEach(symptom => {
|
| 402 |
+
// Check if this symptom has predefined solutions
|
| 403 |
+
if (equipmentData[selectedEquipment].solutions[symptom]) {
|
| 404 |
+
foundSolutions = true;
|
| 405 |
+
|
| 406 |
+
const symptomCard = document.createElement('div');
|
| 407 |
+
symptomCard.className = 'fade-in bg-gray-50 p-4 rounded-lg border border-gray-200';
|
| 408 |
+
|
| 409 |
+
const symptomTitle = document.createElement('h4');
|
| 410 |
+
symptomTitle.className = 'font-medium text-blue-700 mb-2';
|
| 411 |
+
symptomTitle.textContent = `For "${symptom}":`;
|
| 412 |
+
symptomCard.appendChild(symptomTitle);
|
| 413 |
+
|
| 414 |
+
const solutionList = document.createElement('ul');
|
| 415 |
+
solutionList.className = 'list-disc pl-5 space-y-1';
|
| 416 |
+
|
| 417 |
+
equipmentData[selectedEquipment].solutions[symptom].forEach(solution => {
|
| 418 |
+
const li = document.createElement('li');
|
| 419 |
+
li.textContent = solution;
|
| 420 |
+
solutionList.appendChild(li);
|
| 421 |
+
});
|
| 422 |
+
|
| 423 |
+
symptomCard.appendChild(solutionList);
|
| 424 |
+
resultsContainer.appendChild(symptomCard);
|
| 425 |
+
}
|
| 426 |
+
});
|
| 427 |
+
|
| 428 |
+
// If no predefined solutions found, show generic advice
|
| 429 |
+
if (!foundSolutions) {
|
| 430 |
+
const genericCard = document.createElement('div');
|
| 431 |
+
genericCard.className = 'fade-in bg-yellow-50 p-4 rounded-lg border border-yellow-200';
|
| 432 |
+
|
| 433 |
+
const genericTitle = document.createElement('h4');
|
| 434 |
+
genericTitle.className = 'font-medium text-yellow-700 mb-2';
|
| 435 |
+
genericTitle.textContent = 'General Troubleshooting Advice:';
|
| 436 |
+
genericCard.appendChild(genericTitle);
|
| 437 |
+
|
| 438 |
+
const adviceList = document.createElement('ul');
|
| 439 |
+
adviceList.className = 'list-disc pl-5 space-y-1';
|
| 440 |
+
|
| 441 |
+
const advicePoints = [
|
| 442 |
+
'Check all power connections and sources',
|
| 443 |
+
'Verify proper calibration settings',
|
| 444 |
+
'Inspect for visible damage or leaks',
|
| 445 |
+
'Review system logs or error codes',
|
| 446 |
+
'Consult the equipment manual for specific troubleshooting',
|
| 447 |
+
'Consider environmental factors (temperature, humidity)',
|
| 448 |
+
'If problem persists, contact manufacturer support'
|
| 449 |
+
];
|
| 450 |
+
|
| 451 |
+
advicePoints.forEach(advice => {
|
| 452 |
+
const li = document.createElement('li');
|
| 453 |
+
li.textContent = advice;
|
| 454 |
+
adviceList.appendChild(li);
|
| 455 |
+
});
|
| 456 |
+
|
| 457 |
+
genericCard.appendChild(adviceList);
|
| 458 |
+
resultsContainer.appendChild(genericCard);
|
| 459 |
+
|
| 460 |
+
// Also show the symptoms that were entered
|
| 461 |
+
const symptomsCard = document.createElement('div');
|
| 462 |
+
symptomsCard.className = 'fade-in bg-gray-50 p-4 rounded-lg border border-gray-200 mt-4';
|
| 463 |
+
|
| 464 |
+
const symptomsTitle = document.createElement('h4');
|
| 465 |
+
symptomsTitle.className = 'font-medium text-gray-700 mb-2';
|
| 466 |
+
symptomsTitle.textContent = 'Your Reported Symptoms:';
|
| 467 |
+
symptomsCard.appendChild(symptomsTitle);
|
| 468 |
+
|
| 469 |
+
const symptomsList = document.createElement('div');
|
| 470 |
+
symptomsList.className = 'flex flex-wrap gap-2';
|
| 471 |
+
|
| 472 |
+
symptoms.forEach(symptom => {
|
| 473 |
+
const chip = document.createElement('div');
|
| 474 |
+
chip.className = 'bg-gray-200 text-gray-800 text-sm px-3 py-1 rounded-full';
|
| 475 |
+
chip.textContent = symptom;
|
| 476 |
+
symptomsList.appendChild(chip);
|
| 477 |
+
});
|
| 478 |
+
|
| 479 |
+
symptomsCard.appendChild(symptomsList);
|
| 480 |
+
resultsContainer.appendChild(symptomsCard);
|
| 481 |
+
}
|
| 482 |
+
|
| 483 |
+
// Scroll to results
|
| 484 |
+
document.getElementById('results-container').scrollIntoView({ behavior: 'smooth' });
|
| 485 |
+
}
|
| 486 |
+
|
| 487 |
+
// Reset form
|
| 488 |
+
function resetForm() {
|
| 489 |
+
// Reset equipment selection
|
| 490 |
+
document.querySelectorAll('.equipment-card').forEach(card => {
|
| 491 |
+
card.classList.remove('border-blue-500', 'bg-blue-50');
|
| 492 |
+
});
|
| 493 |
+
document.getElementById('equipment-info').classList.add('hidden');
|
| 494 |
+
selectedEquipment = null;
|
| 495 |
+
|
| 496 |
+
// Reset symptoms
|
| 497 |
+
document.getElementById('symptoms').value = '';
|
| 498 |
+
document.getElementById('common-symptoms').innerHTML = '';
|
| 499 |
+
document.getElementById('analyze-btn').disabled = true;
|
| 500 |
+
|
| 501 |
+
// Reset results
|
| 502 |
+
document.getElementById('results-placeholder').classList.remove('hidden');
|
| 503 |
+
document.getElementById('results-container').classList.add('hidden');
|
| 504 |
+
}
|
| 505 |
+
</script>
|
| 506 |
+
<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=apamplona2011/personal-project" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 507 |
+
</html>
|