Spaces:
Running
Running
Add 3 files
Browse files- README.md +7 -5
- index.html +644 -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: front
|
| 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,644 @@
|
|
| 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>ASTU Mech - AI Crop Disease Detection</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, #4ade80 0%, #3b82f6 100%);
|
| 12 |
+
}
|
| 13 |
+
.crop-card:hover {
|
| 14 |
+
transform: translateY(-5px);
|
| 15 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 16 |
+
}
|
| 17 |
+
.upload-area {
|
| 18 |
+
border: 2px dashed #cbd5e0;
|
| 19 |
+
transition: all 0.3s ease;
|
| 20 |
+
}
|
| 21 |
+
.upload-area:hover {
|
| 22 |
+
border-color: #4ade80;
|
| 23 |
+
}
|
| 24 |
+
.upload-area.dragover {
|
| 25 |
+
border-color: #3b82f6;
|
| 26 |
+
background-color: #f0f9ff;
|
| 27 |
+
}
|
| 28 |
+
.disease-card {
|
| 29 |
+
transition: all 0.3s ease;
|
| 30 |
+
}
|
| 31 |
+
.disease-card:hover {
|
| 32 |
+
transform: scale(1.03);
|
| 33 |
+
}
|
| 34 |
+
.pulse-animation {
|
| 35 |
+
animation: pulse 2s infinite;
|
| 36 |
+
}
|
| 37 |
+
@keyframes pulse {
|
| 38 |
+
0% { opacity: 0.8; }
|
| 39 |
+
50% { opacity: 1; }
|
| 40 |
+
100% { opacity: 0.8; }
|
| 41 |
+
}
|
| 42 |
+
</style>
|
| 43 |
+
</head>
|
| 44 |
+
<body class="bg-gray-50 font-sans">
|
| 45 |
+
<!-- Navigation -->
|
| 46 |
+
<nav class="gradient-bg text-white shadow-lg">
|
| 47 |
+
<div class="container mx-auto px-4 py-3">
|
| 48 |
+
<div class="flex justify-between items-center">
|
| 49 |
+
<div class="flex items-center space-x-2">
|
| 50 |
+
<i class="fas fa-robot text-2xl"></i>
|
| 51 |
+
<span class="text-xl font-bold">ASTU Mech</span>
|
| 52 |
+
<span class="text-sm bg-white text-green-600 px-2 py-1 rounded-full ml-2">AI Robotics</span>
|
| 53 |
+
</div>
|
| 54 |
+
<div class="hidden md:flex space-x-6">
|
| 55 |
+
<a href="#home" class="hover:text-green-200 transition">Home</a>
|
| 56 |
+
<a href="#features" class="hover:text-green-200 transition">Features</a>
|
| 57 |
+
<a href="#detect" class="hover:text-green-200 transition">Detect</a>
|
| 58 |
+
<a href="#about" class="hover:text-green-200 transition">About</a>
|
| 59 |
+
</div>
|
| 60 |
+
<button class="md:hidden text-white">
|
| 61 |
+
<i class="fas fa-bars text-2xl"></i>
|
| 62 |
+
</button>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
</nav>
|
| 66 |
+
|
| 67 |
+
<!-- Hero Section -->
|
| 68 |
+
<section id="home" class="gradient-bg text-white py-16">
|
| 69 |
+
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
|
| 70 |
+
<div class="md:w-1/2 mb-10 md:mb-0">
|
| 71 |
+
<h1 class="text-4xl md:text-5xl font-bold mb-4">Revolutionizing Agriculture with AI</h1>
|
| 72 |
+
<p class="text-xl mb-8">ASTU Mech's advanced crop disease detection system helps farmers identify plant diseases early and accurately using artificial intelligence.</p>
|
| 73 |
+
<div class="flex flex-col sm:flex-row space-y-4 sm:space-y-0 sm:space-x-4">
|
| 74 |
+
<a href="#detect" class="bg-white text-green-600 hover:bg-green-100 font-bold py-3 px-6 rounded-lg text-center transition">Try Detection Now</a>
|
| 75 |
+
<a href="#features" class="border-2 border-white hover:bg-white hover:text-green-600 font-bold py-3 px-6 rounded-lg text-center transition">Learn More</a>
|
| 76 |
+
</div>
|
| 77 |
+
</div>
|
| 78 |
+
<div class="md:w-1/2 flex justify-center">
|
| 79 |
+
<div class="relative">
|
| 80 |
+
<img src="https://images.unsplash.com/photo-1586771107445-d3ca888129ce?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="AI in Agriculture" class="rounded-xl shadow-2xl w-full max-w-md border-4 border-white">
|
| 81 |
+
<div class="absolute -bottom-5 -right-5 bg-white text-green-600 p-4 rounded-lg shadow-lg">
|
| 82 |
+
<div class="flex items-center">
|
| 83 |
+
<i class="fas fa-brain text-3xl mr-3"></i>
|
| 84 |
+
<div>
|
| 85 |
+
<div class="font-bold">AI Powered</div>
|
| 86 |
+
<div class="text-sm">94% Accuracy</div>
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
| 93 |
+
</section>
|
| 94 |
+
|
| 95 |
+
<!-- Stats Section -->
|
| 96 |
+
<section class="bg-white py-12">
|
| 97 |
+
<div class="container mx-auto px-4">
|
| 98 |
+
<div class="grid grid-cols-2 md:grid-cols-4 gap-8 text-center">
|
| 99 |
+
<div class="p-6">
|
| 100 |
+
<div class="text-4xl font-bold text-green-600 mb-2">95%</div>
|
| 101 |
+
<div class="text-gray-600">Detection Accuracy</div>
|
| 102 |
+
</div>
|
| 103 |
+
<div class="p-6">
|
| 104 |
+
<div class="text-4xl font-bold text-blue-600 mb-2">50+</div>
|
| 105 |
+
<div class="text-gray-600">Crop Types</div>
|
| 106 |
+
</div>
|
| 107 |
+
<div class="p-6">
|
| 108 |
+
<div class="text-4xl font-bold text-yellow-600 mb-2">200+</div>
|
| 109 |
+
<div class="text-gray-600">Diseases Identified</div>
|
| 110 |
+
</div>
|
| 111 |
+
<div class="p-6">
|
| 112 |
+
<div class="text-4xl font-bold text-red-600 mb-2">24/7</div>
|
| 113 |
+
<div class="text-gray-600">Monitoring</div>
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
</section>
|
| 118 |
+
|
| 119 |
+
<!-- Features Section -->
|
| 120 |
+
<section id="features" class="py-16 bg-gray-50">
|
| 121 |
+
<div class="container mx-auto px-4">
|
| 122 |
+
<h2 class="text-3xl font-bold text-center mb-12">Advanced Features</h2>
|
| 123 |
+
|
| 124 |
+
<div class="grid md:grid-cols-3 gap-8">
|
| 125 |
+
<!-- Feature 1 -->
|
| 126 |
+
<div class="bg-white p-8 rounded-xl shadow-md hover:shadow-lg transition">
|
| 127 |
+
<div class="text-green-500 mb-4">
|
| 128 |
+
<i class="fas fa-camera-retro text-4xl"></i>
|
| 129 |
+
</div>
|
| 130 |
+
<h3 class="text-xl font-bold mb-3">Image Recognition</h3>
|
| 131 |
+
<p class="text-gray-600">Our AI analyzes crop images with precision, identifying subtle signs of disease invisible to the naked eye.</p>
|
| 132 |
+
</div>
|
| 133 |
+
|
| 134 |
+
<!-- Feature 2 -->
|
| 135 |
+
<div class="bg-white p-8 rounded-xl shadow-md hover:shadow-lg transition">
|
| 136 |
+
<div class="text-blue-500 mb-4">
|
| 137 |
+
<i class="fas fa-robot text-4xl"></i>
|
| 138 |
+
</div>
|
| 139 |
+
<h3 class="text-xl font-bold mb-3">Robotic Integration</h3>
|
| 140 |
+
<p class="text-gray-600">ASTU Mech robots can autonomously scan fields, collecting data for continuous monitoring.</p>
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
<!-- Feature 3 -->
|
| 144 |
+
<div class="bg-white p-8 rounded-xl shadow-md hover:shadow-lg transition">
|
| 145 |
+
<div class="text-yellow-500 mb-4">
|
| 146 |
+
<i class="fas fa-chart-line text-4xl"></i>
|
| 147 |
+
</div>
|
| 148 |
+
<h3 class="text-xl font-bold mb-3">Real-time Analytics</h3>
|
| 149 |
+
<p class="text-gray-600">Get instant analysis and historical trends to predict and prevent disease outbreaks.</p>
|
| 150 |
+
</div>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
</section>
|
| 154 |
+
|
| 155 |
+
<!-- Detection Section -->
|
| 156 |
+
<section id="detect" class="py-16 bg-white">
|
| 157 |
+
<div class="container mx-auto px-4">
|
| 158 |
+
<h2 class="text-3xl font-bold text-center mb-12">Crop Disease Detection</h2>
|
| 159 |
+
|
| 160 |
+
<div class="flex flex-col lg:flex-row gap-12">
|
| 161 |
+
<!-- Upload Area -->
|
| 162 |
+
<div class="lg:w-1/2">
|
| 163 |
+
<div id="uploadContainer" class="upload-area rounded-xl p-8 text-center cursor-pointer bg-gray-50">
|
| 164 |
+
<input type="file" id="fileInput" accept="image/*" class="hidden">
|
| 165 |
+
<div class="mb-4">
|
| 166 |
+
<i class="fas fa-cloud-upload-alt text-5xl text-gray-400"></i>
|
| 167 |
+
</div>
|
| 168 |
+
<h3 class="text-xl font-bold mb-2">Upload Crop Image</h3>
|
| 169 |
+
<p class="text-gray-500 mb-4">Drag & drop your image here or click to browse</p>
|
| 170 |
+
<p class="text-sm text-gray-400">Supports: JPG, PNG (Max 5MB)</p>
|
| 171 |
+
</div>
|
| 172 |
+
|
| 173 |
+
<div id="previewContainer" class="hidden mt-6">
|
| 174 |
+
<h3 class="text-lg font-semibold mb-3">Image Preview</h3>
|
| 175 |
+
<div class="relative">
|
| 176 |
+
<img id="imagePreview" src="" alt="Preview" class="rounded-lg w-full max-h-64 object-contain border">
|
| 177 |
+
<button id="removeImage" class="absolute top-2 right-2 bg-red-500 text-white p-2 rounded-full hover:bg-red-600 transition">
|
| 178 |
+
<i class="fas fa-times"></i>
|
| 179 |
+
</button>
|
| 180 |
+
</div>
|
| 181 |
+
<button id="analyzeBtn" class="gradient-bg text-white font-bold py-3 px-6 rounded-lg mt-4 w-full hover:opacity-90 transition">
|
| 182 |
+
Analyze Image <i class="fas fa-search ml-2"></i>
|
| 183 |
+
</button>
|
| 184 |
+
</div>
|
| 185 |
+
</div>
|
| 186 |
+
|
| 187 |
+
<!-- Results Area -->
|
| 188 |
+
<div class="lg:w-1/2">
|
| 189 |
+
<div id="resultsPlaceholder" class="bg-gray-50 rounded-xl p-8 text-center h-full flex flex-col justify-center">
|
| 190 |
+
<i class="fas fa-leaf text-5xl text-gray-300 mb-4"></i>
|
| 191 |
+
<h3 class="text-xl font-bold text-gray-400 mb-2">Detection Results</h3>
|
| 192 |
+
<p class="text-gray-400">Upload an image of a crop leaf to analyze for potential diseases.</p>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<div id="resultsContainer" class="hidden">
|
| 196 |
+
<div class="bg-green-50 border-l-4 border-green-500 p-4 mb-6">
|
| 197 |
+
<div class="flex">
|
| 198 |
+
<div class="flex-shrink-0">
|
| 199 |
+
<i class="fas fa-check-circle text-green-500 text-xl"></i>
|
| 200 |
+
</div>
|
| 201 |
+
<div class="ml-3">
|
| 202 |
+
<h3 class="text-sm font-medium text-green-800">Analysis Complete</h3>
|
| 203 |
+
<div class="mt-2 text-sm text-green-700">
|
| 204 |
+
<p>Our AI has analyzed your image and detected potential issues.</p>
|
| 205 |
+
</div>
|
| 206 |
+
</div>
|
| 207 |
+
</div>
|
| 208 |
+
</div>
|
| 209 |
+
|
| 210 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden mb-6">
|
| 211 |
+
<div class="p-6">
|
| 212 |
+
<div class="flex items-center mb-4">
|
| 213 |
+
<div class="flex-shrink-0 bg-red-100 p-3 rounded-full">
|
| 214 |
+
<i class="fas fa-exclamation-triangle text-red-500 text-xl"></i>
|
| 215 |
+
</div>
|
| 216 |
+
<div class="ml-4">
|
| 217 |
+
<h3 class="text-lg font-bold">Disease Detected</h3>
|
| 218 |
+
<p class="text-gray-500">High confidence (92%)</p>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
|
| 222 |
+
<div class="mb-4">
|
| 223 |
+
<div class="flex justify-between text-sm mb-1">
|
| 224 |
+
<span>Late Blight</span>
|
| 225 |
+
<span>92%</span>
|
| 226 |
+
</div>
|
| 227 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 228 |
+
<div class="bg-red-500 h-2 rounded-full" style="width: 92%"></div>
|
| 229 |
+
</div>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
<div class="mb-4">
|
| 233 |
+
<div class="flex justify-between text-sm mb-1">
|
| 234 |
+
<span>Early Blight</span>
|
| 235 |
+
<span>15%</span>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 238 |
+
<div class="bg-yellow-500 h-2 rounded-full" style="width: 15%"></div>
|
| 239 |
+
</div>
|
| 240 |
+
</div>
|
| 241 |
+
|
| 242 |
+
<div>
|
| 243 |
+
<div class="flex justify-between text-sm mb-1">
|
| 244 |
+
<span>Healthy</span>
|
| 245 |
+
<span>3%</span>
|
| 246 |
+
</div>
|
| 247 |
+
<div class="w-full bg-gray-200 rounded-full h-2">
|
| 248 |
+
<div class="bg-green-500 h-2 rounded-full" style="width: 3%"></div>
|
| 249 |
+
</div>
|
| 250 |
+
</div>
|
| 251 |
+
</div>
|
| 252 |
+
</div>
|
| 253 |
+
|
| 254 |
+
<div class="bg-white rounded-xl shadow-md overflow-hidden">
|
| 255 |
+
<div class="p-6">
|
| 256 |
+
<h3 class="text-lg font-bold mb-4">Recommended Treatment</h3>
|
| 257 |
+
<div class="space-y-4">
|
| 258 |
+
<div class="flex items-start">
|
| 259 |
+
<div class="flex-shrink-0 bg-blue-100 p-2 rounded-full">
|
| 260 |
+
<i class="fas fa-spray-can text-blue-500"></i>
|
| 261 |
+
</div>
|
| 262 |
+
<div class="ml-3">
|
| 263 |
+
<h4 class="text-sm font-medium">Fungicide Application</h4>
|
| 264 |
+
<p class="text-xs text-gray-500">Apply chlorothalonil or mancozeb every 7-10 days</p>
|
| 265 |
+
</div>
|
| 266 |
+
</div>
|
| 267 |
+
<div class="flex items-start">
|
| 268 |
+
<div class="flex-shrink-0 bg-green-100 p-2 rounded-full">
|
| 269 |
+
<i class="fas fa-water text-green-500"></i>
|
| 270 |
+
</div>
|
| 271 |
+
<div class="ml-3">
|
| 272 |
+
<h4 class="text-sm font-medium">Water Management</h4>
|
| 273 |
+
<p class="text-xs text-gray-500">Avoid overhead irrigation to reduce leaf wetness</p>
|
| 274 |
+
</div>
|
| 275 |
+
</div>
|
| 276 |
+
<div class="flex items-start">
|
| 277 |
+
<div class="flex-shrink-0 bg-purple-100 p-2 rounded-full">
|
| 278 |
+
<i class="fas fa-cut text-purple-500"></i>
|
| 279 |
+
</div>
|
| 280 |
+
<div class="ml-3">
|
| 281 |
+
<h4 class="text-sm font-medium">Pruning</h4>
|
| 282 |
+
<p class="text-xs text-gray-500">Remove infected leaves to prevent spread</p>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
</div>
|
| 286 |
+
</div>
|
| 287 |
+
</div>
|
| 288 |
+
</div>
|
| 289 |
+
|
| 290 |
+
<div id="loadingContainer" class="hidden items-center justify-center p-8 bg-gray-50 rounded-xl">
|
| 291 |
+
<div class="text-center">
|
| 292 |
+
<div class="pulse-animation mb-4">
|
| 293 |
+
<i class="fas fa-cogs text-4xl text-blue-500"></i>
|
| 294 |
+
</div>
|
| 295 |
+
<h3 class="text-lg font-bold mb-2">Analyzing Image</h3>
|
| 296 |
+
<p class="text-gray-500">Our AI is processing your image to detect potential diseases...</p>
|
| 297 |
+
<div class="w-full bg-gray-200 rounded-full h-2 mt-4">
|
| 298 |
+
<div id="progressBar" class="bg-blue-500 h-2 rounded-full" style="width: 0%"></div>
|
| 299 |
+
</div>
|
| 300 |
+
</div>
|
| 301 |
+
</div>
|
| 302 |
+
</div>
|
| 303 |
+
</div>
|
| 304 |
+
</div>
|
| 305 |
+
</section>
|
| 306 |
+
|
| 307 |
+
<!-- Common Diseases Section -->
|
| 308 |
+
<section class="py-16 bg-gray-50">
|
| 309 |
+
<div class="container mx-auto px-4">
|
| 310 |
+
<h2 class="text-3xl font-bold text-center mb-12">Common Crop Diseases</h2>
|
| 311 |
+
|
| 312 |
+
<div class="grid sm:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 313 |
+
<!-- Disease 1 -->
|
| 314 |
+
<div class="disease-card bg-white rounded-xl shadow-md overflow-hidden">
|
| 315 |
+
<img src="https://images.unsplash.com/photo-1598301257982-0cf01450abb9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Late Blight" class="w-full h-48 object-cover">
|
| 316 |
+
<div class="p-6">
|
| 317 |
+
<div class="flex items-center mb-3">
|
| 318 |
+
<span class="bg-red-100 text-red-800 text-xs font-semibold px-2.5 py-0.5 rounded">Common</span>
|
| 319 |
+
<span class="ml-2 text-gray-500 text-sm">Tomatoes, Potatoes</span>
|
| 320 |
+
</div>
|
| 321 |
+
<h3 class="text-xl font-bold mb-2">Late Blight</h3>
|
| 322 |
+
<p class="text-gray-600 mb-4">Caused by Phytophthora infestans, this disease causes dark lesions on leaves and stems.</p>
|
| 323 |
+
<div class="flex justify-between text-sm">
|
| 324 |
+
<span class="text-red-500 font-medium">Treatment Needed</span>
|
| 325 |
+
<span class="text-gray-500">90% Accuracy</span>
|
| 326 |
+
</div>
|
| 327 |
+
</div>
|
| 328 |
+
</div>
|
| 329 |
+
|
| 330 |
+
<!-- Disease 2 -->
|
| 331 |
+
<div class="disease-card bg-white rounded-xl shadow-md overflow-hidden">
|
| 332 |
+
<img src="https://images.unsplash.com/photo-1560493676-8f816a9175a8?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Powdery Mildew" class="w-full h-48 object-cover">
|
| 333 |
+
<div class="p-6">
|
| 334 |
+
<div class="flex items-center mb-3">
|
| 335 |
+
<span class="bg-yellow-100 text-yellow-800 text-xs font-semibold px-2.5 py-0.5 rounded">Moderate</span>
|
| 336 |
+
<span class="ml-2 text-gray-500 text-sm">Cucurbits, Grapes</span>
|
| 337 |
+
</div>
|
| 338 |
+
<h3 class="text-xl font-bold mb-2">Powdery Mildew</h3>
|
| 339 |
+
<p class="text-gray-600 mb-4">White powdery spots on leaves and stems caused by fungal pathogens.</p>
|
| 340 |
+
<div class="flex justify-between text-sm">
|
| 341 |
+
<span class="text-yellow-500 font-medium">Monitor Closely</span>
|
| 342 |
+
<span class="text-gray-500">88% Accuracy</span>
|
| 343 |
+
</div>
|
| 344 |
+
</div>
|
| 345 |
+
</div>
|
| 346 |
+
|
| 347 |
+
<!-- Disease 3 -->
|
| 348 |
+
<div class="disease-card bg-white rounded-xl shadow-md overflow-hidden">
|
| 349 |
+
<img src="https://images.unsplash.com/photo-1597852074816-d933c7d2b988?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80" alt="Bacterial Spot" class="w-full h-48 object-cover">
|
| 350 |
+
<div class="p-6">
|
| 351 |
+
<div class="flex items-center mb-3">
|
| 352 |
+
<span class="bg-purple-100 text-purple-800 text-xs font-semibold px-2.5 py-0.5 rounded">Serious</span>
|
| 353 |
+
<span class="ml-2 text-gray-500 text-sm">Peppers, Tomatoes</span>
|
| 354 |
+
</div>
|
| 355 |
+
<h3 class="text-xl font-bold mb-2">Bacterial Spot</h3>
|
| 356 |
+
<p class="text-gray-600 mb-4">Small, dark, raised spots on leaves caused by Xanthomonas bacteria.</p>
|
| 357 |
+
<div class="flex justify-between text-sm">
|
| 358 |
+
<span class="text-purple-500 font-medium">Immediate Action</span>
|
| 359 |
+
<span class="text-gray-500">85% Accuracy</span>
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
</div>
|
| 364 |
+
|
| 365 |
+
<div class="text-center mt-10">
|
| 366 |
+
<a href="#" class="inline-flex items-center text-green-600 hover:text-green-800 font-medium">
|
| 367 |
+
View all diseases
|
| 368 |
+
<i class="fas fa-arrow-right ml-2"></i>
|
| 369 |
+
</a>
|
| 370 |
+
</div>
|
| 371 |
+
</div>
|
| 372 |
+
</section>
|
| 373 |
+
|
| 374 |
+
<!-- About Section -->
|
| 375 |
+
<section id="about" class="py-16 bg-white">
|
| 376 |
+
<div class="container mx-auto px-4">
|
| 377 |
+
<div class="flex flex-col lg:flex-row items-center">
|
| 378 |
+
<div class="lg:w-1/2 mb-10 lg:mb-0 lg:pr-12">
|
| 379 |
+
<h2 class="text-3xl font-bold mb-6">About ASTU Mech</h2>
|
| 380 |
+
<p class="text-gray-600 mb-4">ASTU Mech is an innovative agricultural technology initiative developed by Mintesinot Kasa at Adama Science and Technology University, combining robotics and artificial intelligence to revolutionize farming practices.</p>
|
| 381 |
+
<p class="text-gray-600 mb-6">Our mission is to empower farmers with cutting-edge tools that increase crop yields, reduce losses from disease, and promote sustainable agricultural practices through precision technology.</p>
|
| 382 |
+
|
| 383 |
+
<div class="space-y-4">
|
| 384 |
+
<div class="flex items-start">
|
| 385 |
+
<div class="flex-shrink-0 bg-green-100 p-2 rounded-full">
|
| 386 |
+
<i class="fas fa-university text-green-500"></i>
|
| 387 |
+
</div>
|
| 388 |
+
<div class="ml-3">
|
| 389 |
+
<h4 class="font-medium">University Research</h4>
|
| 390 |
+
<p class="text-sm text-gray-500">Backed by Adama Science and Technology University's agricultural research</p>
|
| 391 |
+
</div>
|
| 392 |
+
</div>
|
| 393 |
+
<div class="flex items-start">
|
| 394 |
+
<div class="flex-shrink-0 bg-blue-100 p-2 rounded-full">
|
| 395 |
+
<i class="fas fa-microscope text-blue-500"></i>
|
| 396 |
+
</div>
|
| 397 |
+
<div class="ml-3">
|
| 398 |
+
<h4 class="font-medium">Field Tested</h4>
|
| 399 |
+
<p class="text-sm text-gray-500">Validated with real-world data from Ethiopian farms</p>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
<div class="flex items-start">
|
| 403 |
+
<div class="flex-shrink-0 bg-purple-100 p-2 rounded-full">
|
| 404 |
+
<i class="fas fa-users text-purple-500"></i>
|
| 405 |
+
</div>
|
| 406 |
+
<div class="ml-3">
|
| 407 |
+
<h4 class="font-medium">Farmer Focused</h4>
|
| 408 |
+
<p class="text-sm text-gray-500">Designed specifically for the needs of local farmers</p>
|
| 409 |
+
</div>
|
| 410 |
+
</div>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
|
| 414 |
+
<div class="lg:w-1/2">
|
| 415 |
+
<div class="bg-gray-100 rounded-xl p-6">
|
| 416 |
+
<h3 class="text-xl font-bold mb-4">Meet the Developer</h3>
|
| 417 |
+
<div class="flex items-start">
|
| 418 |
+
<img src="https://images.unsplash.com/photo-1560250097-0b93528c311a?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=200&q=80" alt="Mintesinot Kasa" class="w-20 h-20 rounded-full object-cover border-4 border-white shadow">
|
| 419 |
+
<div class="ml-4">
|
| 420 |
+
<h4 class="font-bold">Mintesinot Kasa</h4>
|
| 421 |
+
<p class="text-sm text-gray-500 mb-2">Robotics & AI Engineer</p>
|
| 422 |
+
<p class="text-sm text-gray-600">"My goal is to bridge the gap between advanced technology and practical farming solutions to help feed our growing population."</p>
|
| 423 |
+
<div class="flex space-x-3 mt-3">
|
| 424 |
+
<a href="#" class="text-blue-500 hover:text-blue-700"><i class="fab fa-linkedin"></i></a>
|
| 425 |
+
<a href="#" class="text-gray-700 hover:text-gray-900"><i class="fab fa-github"></i></a>
|
| 426 |
+
<a href="#" class="text-blue-400 hover:text-blue-600"><i class="fab fa-twitter"></i></a>
|
| 427 |
+
</div>
|
| 428 |
+
</div>
|
| 429 |
+
</div>
|
| 430 |
+
|
| 431 |
+
<div class="mt-6 pt-6 border-t border-gray-200">
|
| 432 |
+
<h3 class="text-xl font-bold mb-4">Technology Stack</h3>
|
| 433 |
+
<div class="grid grid-cols-3 gap-4">
|
| 434 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 435 |
+
<i class="fab fa-python text-3xl text-blue-500 mb-2"></i>
|
| 436 |
+
<div class="text-xs font-medium">Python</div>
|
| 437 |
+
</div>
|
| 438 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 439 |
+
<i class="fas fa-brain text-3xl text-purple-500 mb-2"></i>
|
| 440 |
+
<div class="text-xs font-medium">TensorFlow</div>
|
| 441 |
+
</div>
|
| 442 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 443 |
+
<i class="fab fa-raspberry-pi text-3xl text-red-500 mb-2"></i>
|
| 444 |
+
<div class="text-xs font-medium">Raspberry Pi</div>
|
| 445 |
+
</div>
|
| 446 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 447 |
+
<i class="fas fa-robot text-3xl text-green-500 mb-2"></i>
|
| 448 |
+
<div class="text-xs font-medium">ROS</div>
|
| 449 |
+
</div>
|
| 450 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 451 |
+
<i class="fab fa-js text-3xl text-yellow-500 mb-2"></i>
|
| 452 |
+
<div class="text-xs font-medium">JavaScript</div>
|
| 453 |
+
</div>
|
| 454 |
+
<div class="bg-white p-3 rounded-lg text-center shadow-sm">
|
| 455 |
+
<i class="fas fa-database text-3xl text-blue-400 mb-2"></i>
|
| 456 |
+
<div class="text-xs font-medium">PostgreSQL</div>
|
| 457 |
+
</div>
|
| 458 |
+
</div>
|
| 459 |
+
</div>
|
| 460 |
+
</div>
|
| 461 |
+
</div>
|
| 462 |
+
</div>
|
| 463 |
+
</div>
|
| 464 |
+
</section>
|
| 465 |
+
|
| 466 |
+
<!-- Newsletter Section -->
|
| 467 |
+
<section class="gradient-bg text-white py-12">
|
| 468 |
+
<div class="container mx-auto px-4 text-center">
|
| 469 |
+
<h2 class="text-2xl font-bold mb-2">Stay Updated with ASTU Mech</h2>
|
| 470 |
+
<p class="mb-6 max-w-2xl mx-auto">Subscribe to our newsletter for the latest updates on agricultural AI and robotics.</p>
|
| 471 |
+
|
| 472 |
+
<div class="flex flex-col sm:flex-row max-w-md mx-auto sm:max-w-xl">
|
| 473 |
+
<input type="email" placeholder="Your email address" class="flex-grow px-4 py-3 rounded-l-lg sm:rounded-r-none rounded-r-lg text-gray-900 focus:outline-none">
|
| 474 |
+
<button class="bg-green-700 hover:bg-green-800 px-6 py-3 rounded-r-lg sm:rounded-l-none rounded-l-lg mt-2 sm:mt-0 font-medium transition">Subscribe</button>
|
| 475 |
+
</div>
|
| 476 |
+
|
| 477 |
+
<p class="text-sm text-green-100 mt-3">We respect your privacy. Unsubscribe at any time.</p>
|
| 478 |
+
</div>
|
| 479 |
+
</section>
|
| 480 |
+
|
| 481 |
+
<!-- Footer -->
|
| 482 |
+
<footer class="bg-gray-900 text-white py-12">
|
| 483 |
+
<div class="container mx-auto px-4">
|
| 484 |
+
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
| 485 |
+
<div>
|
| 486 |
+
<div class="flex items-center mb-4">
|
| 487 |
+
<i class="fas fa-robot text-2xl mr-2"></i>
|
| 488 |
+
<span class="text-xl font-bold">ASTU Mech</span>
|
| 489 |
+
</div>
|
| 490 |
+
<p class="text-gray-400 mb-4">Advancing agriculture through robotics and artificial intelligence.</p>
|
| 491 |
+
<div class="flex space-x-4">
|
| 492 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-facebook-f"></i></a>
|
| 493 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-twitter"></i></a>
|
| 494 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-instagram"></i></a>
|
| 495 |
+
<a href="#" class="text-gray-400 hover:text-white"><i class="fab fa-linkedin-in"></i></a>
|
| 496 |
+
</div>
|
| 497 |
+
</div>
|
| 498 |
+
|
| 499 |
+
<div>
|
| 500 |
+
<h3 class="text-lg font-semibold mb-4">Quick Links</h3>
|
| 501 |
+
<ul class="space-y-2">
|
| 502 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Home</a></li>
|
| 503 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li>
|
| 504 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Detection</a></li>
|
| 505 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Diseases</a></li>
|
| 506 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">About</a></li>
|
| 507 |
+
</ul>
|
| 508 |
+
</div>
|
| 509 |
+
|
| 510 |
+
<div>
|
| 511 |
+
<h3 class="text-lg font-semibold mb-4">Resources</h3>
|
| 512 |
+
<ul class="space-y-2">
|
| 513 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Documentation</a></li>
|
| 514 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Research Papers</a></li>
|
| 515 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">API</a></li>
|
| 516 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">GitHub</a></li>
|
| 517 |
+
<li><a href="#" class="text-gray-400 hover:text-white transition">Blog</a></li>
|
| 518 |
+
</ul>
|
| 519 |
+
</div>
|
| 520 |
+
|
| 521 |
+
<div>
|
| 522 |
+
<h3 class="text-lg font-semibold mb-4">Contact</h3>
|
| 523 |
+
<ul class="space-y-2">
|
| 524 |
+
<li class="flex items-center">
|
| 525 |
+
<i class="fas fa-map-marker-alt text-gray-400 mr-2"></i>
|
| 526 |
+
<span class="text-gray-400">Adama Science & Technology University, Ethiopia</span>
|
| 527 |
+
</li>
|
| 528 |
+
<li class="flex items-center">
|
| 529 |
+
<i class="fas fa-envelope text-gray-400 mr-2"></i>
|
| 530 |
+
<span class="text-gray-400">info@astumech.edu.et</span>
|
| 531 |
+
</li>
|
| 532 |
+
<li class="flex items-center">
|
| 533 |
+
<i class="fas fa-phone text-gray-400 mr-2"></i>
|
| 534 |
+
<span class="text-gray-400">+251 123 456 789</span>
|
| 535 |
+
</li>
|
| 536 |
+
</ul>
|
| 537 |
+
</div>
|
| 538 |
+
</div>
|
| 539 |
+
|
| 540 |
+
<div class="border-t border-gray-800 mt-10 pt-6 flex flex-col md:flex-row justify-between items-center">
|
| 541 |
+
<p class="text-gray-400 text-sm mb-4 md:mb-0">© 2023 ASTU Mech. All rights reserved.</p>
|
| 542 |
+
<div class="flex space-x-6">
|
| 543 |
+
<a href="#" class="text-gray-400 hover:text-white text-sm">Privacy Policy</a>
|
| 544 |
+
<a href="#" class="text-gray-400 hover:text-white text-sm">Terms of Service</a>
|
| 545 |
+
<a href="#" class="text-gray-400 hover:text-white text-sm">Cookies</a>
|
| 546 |
+
</div>
|
| 547 |
+
</div>
|
| 548 |
+
</div>
|
| 549 |
+
</footer>
|
| 550 |
+
|
| 551 |
+
<script>
|
| 552 |
+
// DOM Elements
|
| 553 |
+
const uploadContainer = document.getElementById('uploadContainer');
|
| 554 |
+
const fileInput = document.getElementById('fileInput');
|
| 555 |
+
const previewContainer = document.getElementById('previewContainer');
|
| 556 |
+
const imagePreview = document.getElementById('imagePreview');
|
| 557 |
+
const removeImage = document.getElementById('removeImage');
|
| 558 |
+
const analyzeBtn = document.getElementById('analyzeBtn');
|
| 559 |
+
const resultsPlaceholder = document.getElementById('resultsPlaceholder');
|
| 560 |
+
const resultsContainer = document.getElementById('resultsContainer');
|
| 561 |
+
const loadingContainer = document.getElementById('loadingContainer');
|
| 562 |
+
const progressBar = document.getElementById('progressBar');
|
| 563 |
+
|
| 564 |
+
// Event Listeners
|
| 565 |
+
uploadContainer.addEventListener('click', () => fileInput.click());
|
| 566 |
+
|
| 567 |
+
uploadContainer.addEventListener('dragover', (e) => {
|
| 568 |
+
e.preventDefault();
|
| 569 |
+
uploadContainer.classList.add('dragover');
|
| 570 |
+
});
|
| 571 |
+
|
| 572 |
+
uploadContainer.addEventListener('dragleave', () => {
|
| 573 |
+
uploadContainer.classList.remove('dragover');
|
| 574 |
+
});
|
| 575 |
+
|
| 576 |
+
uploadContainer.addEventListener('drop', (e) => {
|
| 577 |
+
e.preventDefault();
|
| 578 |
+
uploadContainer.classList.remove('dragover');
|
| 579 |
+
if (e.dataTransfer.files.length) {
|
| 580 |
+
fileInput.files = e.dataTransfer.files;
|
| 581 |
+
handleFileUpload(fileInput.files[0]);
|
| 582 |
+
}
|
| 583 |
+
});
|
| 584 |
+
|
| 585 |
+
fileInput.addEventListener('change', () => {
|
| 586 |
+
if (fileInput.files.length) {
|
| 587 |
+
handleFileUpload(fileInput.files[0]);
|
| 588 |
+
}
|
| 589 |
+
});
|
| 590 |
+
|
| 591 |
+
removeImage.addEventListener('click', (e) => {
|
| 592 |
+
e.stopPropagation();
|
| 593 |
+
fileInput.value = '';
|
| 594 |
+
previewContainer.classList.add('hidden');
|
| 595 |
+
resultsContainer.classList.add('hidden');
|
| 596 |
+
loadingContainer.classList.add('hidden');
|
| 597 |
+
resultsPlaceholder.classList.remove('hidden');
|
| 598 |
+
});
|
| 599 |
+
|
| 600 |
+
analyzeBtn.addEventListener('click', () => {
|
| 601 |
+
previewContainer.classList.add('hidden');
|
| 602 |
+
loadingContainer.classList.remove('hidden');
|
| 603 |
+
resultsPlaceholder.classList.add('hidden');
|
| 604 |
+
|
| 605 |
+
// Simulate AI processing
|
| 606 |
+
let progress = 0;
|
| 607 |
+
const interval = setInterval(() => {
|
| 608 |
+
progress += Math.random() * 10;
|
| 609 |
+
if (progress > 100) progress = 100;
|
| 610 |
+
progressBar.style.width = `${progress}%`;
|
| 611 |
+
|
| 612 |
+
if (progress === 100) {
|
| 613 |
+
clearInterval(interval);
|
| 614 |
+
setTimeout(() => {
|
| 615 |
+
loadingContainer.classList.add('hidden');
|
| 616 |
+
resultsContainer.classList.remove('hidden');
|
| 617 |
+
}, 500);
|
| 618 |
+
}
|
| 619 |
+
}, 300);
|
| 620 |
+
});
|
| 621 |
+
|
| 622 |
+
// Functions
|
| 623 |
+
function handleFileUpload(file) {
|
| 624 |
+
if (!file.type.match('image.*')) {
|
| 625 |
+
alert('Please upload an image file (JPG, PNG)');
|
| 626 |
+
return;
|
| 627 |
+
}
|
| 628 |
+
|
| 629 |
+
if (file.size > 5 * 1024 * 1024) {
|
| 630 |
+
alert('File size should be less than 5MB');
|
| 631 |
+
return;
|
| 632 |
+
}
|
| 633 |
+
|
| 634 |
+
const reader = new FileReader();
|
| 635 |
+
reader.onload = (e) => {
|
| 636 |
+
imagePreview.src = e.target.result;
|
| 637 |
+
previewContainer.classList.remove('hidden');
|
| 638 |
+
resultsPlaceholder.classList.add('hidden');
|
| 639 |
+
};
|
| 640 |
+
reader.readAsDataURL(file);
|
| 641 |
+
}
|
| 642 |
+
</script>
|
| 643 |
+
<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=Kenokasakasa/front" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 644 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|