Upload 7 files
Browse files- templates/govt-schemes.html +308 -0
- templates/home.html +172 -0
- templates/home1.html +98 -0
- templates/s1.html +172 -0
- templates/s2.html +244 -0
- templates/s3.html +324 -0
- templates/veterinary_map.html +128 -0
templates/govt-schemes.html
ADDED
|
@@ -0,0 +1,308 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Government Schemes and Financial Aids</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
background-color: #FAF3E0;
|
| 13 |
+
color: #333;
|
| 14 |
+
}
|
| 15 |
+
.container {
|
| 16 |
+
max-width: 900px;
|
| 17 |
+
margin: auto;
|
| 18 |
+
background: white;
|
| 19 |
+
padding: 20px;
|
| 20 |
+
border-radius: 10px;
|
| 21 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
| 22 |
+
}
|
| 23 |
+
.title-box {
|
| 24 |
+
background-color: #2C3E50;
|
| 25 |
+
color: #fff;
|
| 26 |
+
padding: 20px;
|
| 27 |
+
text-align: center;
|
| 28 |
+
border-radius: 8px;
|
| 29 |
+
margin-bottom: 20px;
|
| 30 |
+
}
|
| 31 |
+
.title-box h1 {
|
| 32 |
+
font-size: 2.5em;
|
| 33 |
+
margin-bottom: 10px;
|
| 34 |
+
color: #F5A623;
|
| 35 |
+
}
|
| 36 |
+
.title-box p {
|
| 37 |
+
font-size: 1.2em;
|
| 38 |
+
}
|
| 39 |
+
.section {
|
| 40 |
+
background: #fff;
|
| 41 |
+
margin: 15px 0;
|
| 42 |
+
padding: 15px;
|
| 43 |
+
border-radius: 8px;
|
| 44 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 45 |
+
}
|
| 46 |
+
h2 {
|
| 47 |
+
color: #2980B9;
|
| 48 |
+
cursor: pointer;
|
| 49 |
+
}
|
| 50 |
+
p {
|
| 51 |
+
line-height: 1.6;
|
| 52 |
+
}
|
| 53 |
+
a {
|
| 54 |
+
display: block;
|
| 55 |
+
margin-top: 10px;
|
| 56 |
+
color: #F5A623;
|
| 57 |
+
text-decoration: none;
|
| 58 |
+
font-weight: bold;
|
| 59 |
+
}
|
| 60 |
+
ul {
|
| 61 |
+
list-style-type: square;
|
| 62 |
+
margin-left: 20px;
|
| 63 |
+
}
|
| 64 |
+
.content {
|
| 65 |
+
display: none;
|
| 66 |
+
padding-top: 10px;
|
| 67 |
+
}
|
| 68 |
+
</style>
|
| 69 |
+
</head>
|
| 70 |
+
<body>
|
| 71 |
+
<div class="container">
|
| 72 |
+
<div class="title-box">
|
| 73 |
+
<h1>Government Schemes and Financial Aids</h1>
|
| 74 |
+
<p>Explore the latest government initiatives supporting livestock farming in India.</p>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<!-- Schemes Section -->
|
| 78 |
+
<div class="section">
|
| 79 |
+
<h2 onclick="toggleContent('schemeContent')"> Schemes </h2>
|
| 80 |
+
<div id="schemeContent" class="content">
|
| 81 |
+
<div>
|
| 82 |
+
<h3>1. National Livestock Mission (NLM)</h3>
|
| 83 |
+
<p><strong>Objective:</strong> The primary goal of NLM is to promote sustainable development in the livestock sector, focusing on breed improvement, feed development, and improving the overall productivity of the livestock population in India.</p>
|
| 84 |
+
<p><strong>Key Features:</strong></p>
|
| 85 |
+
<ul>
|
| 86 |
+
<li>Breed improvement programs for various livestock such as sheep, goats, pigs, and poultry.</li>
|
| 87 |
+
<li>Support for fodder and feed development to improve the nutritional status of livestock.</li>
|
| 88 |
+
<li>Provides financial assistance of up to 50% for setting up projects aimed at enhancing livestock production.</li>
|
| 89 |
+
<li>Assistance for establishing infrastructure like feed plants and breeding centers.</li>
|
| 90 |
+
</ul>
|
| 91 |
+
<p><strong>Benefits:</strong></p>
|
| 92 |
+
<ul>
|
| 93 |
+
<li>Improvement in livestock health and productivity.</li>
|
| 94 |
+
<li>Enhanced quality of milk, meat, and other livestock products.</li>
|
| 95 |
+
<li>Improvement in the livelihoods of rural farmers and stakeholders.</li>
|
| 96 |
+
</ul>
|
| 97 |
+
<p><strong>Eligibility:</strong></p>
|
| 98 |
+
<ul>
|
| 99 |
+
<li>Farmers, entrepreneurs, and cooperatives involved in livestock farming.</li>
|
| 100 |
+
<li>State governments, NGOs, and private sector entities may also apply for certain components.</li>
|
| 101 |
+
</ul>
|
| 102 |
+
<a href="https://dahd.gov.in/schemes/programmes/national_livestock_mission" target="_blank">More Info</a>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div>
|
| 106 |
+
<h3>2. Rashtriya Gokul Mission (RGM)</h3>
|
| 107 |
+
<p><strong>Objective:</strong> This mission aims to conserve and improve the genetic resources of indigenous bovine breeds in India, focusing on increasing milk production and improving the genetic potential of these breeds.</p>
|
| 108 |
+
<p><strong>Key Features:</strong></p>
|
| 109 |
+
<ul>
|
| 110 |
+
<li>Establishment of breed multiplication farms for the conservation and multiplication of indigenous breeds.</li>
|
| 111 |
+
<li>Support for scientific breeding programs and IVF-based technology for improving cattle genetics.</li>
|
| 112 |
+
<li>Subsidized financial assistance for infrastructure development like barns, breeding centers, and livestock management tools.</li>
|
| 113 |
+
</ul>
|
| 114 |
+
<p><strong>Benefits:</strong></p>
|
| 115 |
+
<ul>
|
| 116 |
+
<li>Preservation and enhancement of indigenous cattle breeds.</li>
|
| 117 |
+
<li>Improved milk production and quality of milk from indigenous breeds.</li>
|
| 118 |
+
<li>Boosted income for farmers by focusing on genetic improvement.</li>
|
| 119 |
+
</ul>
|
| 120 |
+
<p><strong>Eligibility:</strong></p>
|
| 121 |
+
<ul>
|
| 122 |
+
<li>Farmers and entrepreneurs involved in cattle farming or breeding.</li>
|
| 123 |
+
<li>Government and private sector entities working in animal husbandry and veterinary sciences.</li>
|
| 124 |
+
</ul>
|
| 125 |
+
<a href="https://dahd.nic.in/" target="_blank">More Info</a>
|
| 126 |
+
</div>
|
| 127 |
+
|
| 128 |
+
<div>
|
| 129 |
+
<h3>3. Dairy Entrepreneurship Development Scheme (DEDS)</h3>
|
| 130 |
+
<p><strong>Objective:</strong> This scheme aims to encourage setting up of modern dairy farms and milk processing units, providing self-employment opportunities for entrepreneurs in the dairy sector.</p>
|
| 131 |
+
<p><strong>Key Features:</strong></p>
|
| 132 |
+
<ul>
|
| 133 |
+
<li>Subsidy ranging from 25% to 33% for entrepreneurs setting up dairy farms, milk processing units, and other related infrastructure.</li>
|
| 134 |
+
<li>Loans are provided through NABARD and other financial institutions at subsidized interest rates.</li>
|
| 135 |
+
<li>Support for establishing dairy equipment, cooling units, and packaging systems.</li>
|
| 136 |
+
<li>Training and capacity building programs for entrepreneurs to ensure they are equipped to manage modern dairy farms.</li>
|
| 137 |
+
</ul>
|
| 138 |
+
<p><strong>Benefits:</strong></p>
|
| 139 |
+
<ul>
|
| 140 |
+
<li>Increased milk production and better processing facilities in the dairy sector.</li>
|
| 141 |
+
<li>Creation of self-employment opportunities for youth in rural areas.</li>
|
| 142 |
+
<li>Improved income for dairy farmers through enhanced productivity and quality of dairy products.</li>
|
| 143 |
+
</ul>
|
| 144 |
+
<p><strong>Eligibility:</strong></p>
|
| 145 |
+
<ul>
|
| 146 |
+
<li>Individuals, farmers, and cooperatives in the dairy sector.</li>
|
| 147 |
+
<li>NGOs and private sector entrepreneurs involved in dairy farming and milk processing.</li>
|
| 148 |
+
<li>Applicants must be residents of India and meet specific age and educational criteria.</li>
|
| 149 |
+
</ul>
|
| 150 |
+
<a href="https://www.nabard.org/" target="_blank">More Info</a>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<!-- Loans Section -->
|
| 156 |
+
<div class="section">
|
| 157 |
+
<h2 onclick="toggleContent('loanContent')"> Loans</h2>
|
| 158 |
+
<div id="loanContent" class="content">
|
| 159 |
+
<div>
|
| 160 |
+
<h3>1. Kisan Credit Card (KCC)</h3>
|
| 161 |
+
<p><strong>Objective:</strong> The Kisan Credit Card (KCC) is a government initiative aimed at providing short-term credit to farmers, including livestock farmers, for the purchase of inputs like feed, medicines, and other requirements.</p>
|
| 162 |
+
<p><strong>Key Features:</strong></p>
|
| 163 |
+
<ul>
|
| 164 |
+
<li>Loans available for livestock and agriculture-related activities at a low-interest rate.</li>
|
| 165 |
+
<li>Provides a credit limit to farmers for their daily working capital requirements.</li>
|
| 166 |
+
<li>Loan amounts vary depending on the type of farming and the livestock held by the farmer.</li>
|
| 167 |
+
</ul>
|
| 168 |
+
<p><strong>Benefits:</strong></p>
|
| 169 |
+
<ul>
|
| 170 |
+
<li>Easy access to working capital for livestock farming.</li>
|
| 171 |
+
<li>Subsidized interest rates for farmers.</li>
|
| 172 |
+
<li>Helps in meeting expenses related to feed, health, and infrastructure for livestock.</li>
|
| 173 |
+
</ul>
|
| 174 |
+
<p><strong>Eligibility:</strong></p>
|
| 175 |
+
<ul>
|
| 176 |
+
<li>Farmers, including livestock farmers, with a KCC application.</li>
|
| 177 |
+
<li>Applicants must have a valid Aadhaar card and other documents.</li>
|
| 178 |
+
</ul>
|
| 179 |
+
<a href="https://www.nabard.org/" target="_blank">More Info</a>
|
| 180 |
+
</div>
|
| 181 |
+
|
| 182 |
+
<div>
|
| 183 |
+
<h3>2. Rural Infrastructure Development Fund (RIDF)</h3>
|
| 184 |
+
<p><strong>Objective:</strong> RIDF provides financial support for creating infrastructure in rural areas, including facilities for livestock farming, such as cold storage, veterinary clinics, and dairy farms.</p>
|
| 185 |
+
<p><strong>Key Features:</strong></p>
|
| 186 |
+
<ul>
|
| 187 |
+
<li>Loan facilities for building infrastructure related to livestock farming and rural economy.</li>
|
| 188 |
+
<li>Offers long-term loans at affordable interest rates.</li>
|
| 189 |
+
<li>Focuses on rural development and improving the productivity of livestock farming.</li>
|
| 190 |
+
</ul>
|
| 191 |
+
<p><strong>Benefits:</strong></p>
|
| 192 |
+
<ul>
|
| 193 |
+
<li>Improves rural infrastructure for livestock management.</li>
|
| 194 |
+
<li>Boosts the efficiency of rural farmers in livestock farming activities.</li>
|
| 195 |
+
</ul>
|
| 196 |
+
<p><strong>Eligibility:</strong></p>
|
| 197 |
+
<ul>
|
| 198 |
+
<li>State governments, rural development agencies, and cooperatives.</li>
|
| 199 |
+
<li>Private sector enterprises working in rural and livestock infrastructure development.</li>
|
| 200 |
+
</ul>
|
| 201 |
+
<a href="https://www.nabard.org/" target="_blank">More Info</a>
|
| 202 |
+
</div>
|
| 203 |
+
|
| 204 |
+
<div>
|
| 205 |
+
<h3>3. NABARD Livestock Development Loan</h3>
|
| 206 |
+
<p><strong>Objective:</strong> The loan is designed to support livestock development activities like dairy farming, poultry, and other animal husbandry practices in rural India.</p>
|
| 207 |
+
<p><strong>Key Features:</strong></p>
|
| 208 |
+
<ul>
|
| 209 |
+
<li>Low-interest loans for livestock farming, including for the purchase of animals and development of infrastructure.</li>
|
| 210 |
+
<li>Loans available for setting up modern facilities like dairy farms, processing units, and feed mills.</li>
|
| 211 |
+
</ul>
|
| 212 |
+
<p><strong>Benefits:</strong></p>
|
| 213 |
+
<ul>
|
| 214 |
+
<li>Improved productivity and quality of livestock farming.</li>
|
| 215 |
+
<li>Helps farmers access modern farming tools and techniques.</li>
|
| 216 |
+
</ul>
|
| 217 |
+
<p><strong>Eligibility:</strong></p>
|
| 218 |
+
<ul>
|
| 219 |
+
<li>Farmers and cooperatives involved in livestock farming activities.</li>
|
| 220 |
+
<li>Private and public sector entities operating in the livestock industry.</li>
|
| 221 |
+
</ul>
|
| 222 |
+
<a href="https://www.nabard.org/" target="_blank">More Info</a>
|
| 223 |
+
</div>
|
| 224 |
+
</div>
|
| 225 |
+
</div>
|
| 226 |
+
|
| 227 |
+
<!-- Subsidies Section -->
|
| 228 |
+
<div class="section">
|
| 229 |
+
<h2 onclick="toggleContent('subsidyContent')"> Subsidies </h2>
|
| 230 |
+
<div id="subsidyContent" class="content">
|
| 231 |
+
<div>
|
| 232 |
+
<h3>1. Livestock Insurance Scheme</h3>
|
| 233 |
+
<p><strong>Objective:</strong> The scheme aims to provide financial coverage for livestock against risks like accidents, diseases, and natural calamities.</p>
|
| 234 |
+
<p><strong>Key Features:</strong></p>
|
| 235 |
+
<ul>
|
| 236 |
+
<li>Subsidy on premiums paid for livestock insurance policies.</li>
|
| 237 |
+
<li>Covers cows, buffaloes, poultry, sheep, goats, and other farm animals.</li>
|
| 238 |
+
<li>Premiums are subsidized by the government to make insurance affordable for farmers.</li>
|
| 239 |
+
</ul>
|
| 240 |
+
<p><strong>Benefits:</strong></p>
|
| 241 |
+
<ul>
|
| 242 |
+
<li>Helps farmers recover financial losses in case of livestock death or accidents.</li>
|
| 243 |
+
<li>Provides a safety net for farmers involved in high-risk livestock farming activities.</li>
|
| 244 |
+
</ul>
|
| 245 |
+
<p><strong>Eligibility:</strong></p>
|
| 246 |
+
<ul>
|
| 247 |
+
<li>Farmers, cooperatives, and rural entrepreneurs involved in livestock farming.</li>
|
| 248 |
+
</ul>
|
| 249 |
+
<a href="https://dahd.nic.in/" target="_blank">More Info</a>
|
| 250 |
+
</div>
|
| 251 |
+
|
| 252 |
+
<div>
|
| 253 |
+
<h3>2. Subsidy for Fodder Development</h3>
|
| 254 |
+
<p><strong>Objective:</strong> This subsidy program aims to improve fodder production, ensuring the availability of nutritious feed for livestock, which is essential for healthy and productive animals.</p>
|
| 255 |
+
<p><strong>Key Features:</strong></p>
|
| 256 |
+
<ul>
|
| 257 |
+
<li>Government subsidy for setting up fodder farms, storage units, and development of modern fodder processing technology.</li>
|
| 258 |
+
<li>Assistance for growing high-quality fodder crops and developing pastures for grazing.</li>
|
| 259 |
+
<li>Training programs for farmers on improved fodder management techniques.</li>
|
| 260 |
+
</ul>
|
| 261 |
+
<p><strong>Benefits:</strong></p>
|
| 262 |
+
<ul>
|
| 263 |
+
<li>Improved availability of high-quality fodder.</li>
|
| 264 |
+
<li>Better animal health and productivity due to proper nutrition.</li>
|
| 265 |
+
<li>Helps in reducing the dependency on external feed sources, leading to cost savings for farmers.</li>
|
| 266 |
+
</ul>
|
| 267 |
+
<p><strong>Eligibility:</strong></p>
|
| 268 |
+
<ul>
|
| 269 |
+
<li>Farmers, dairy entrepreneurs, and cooperative societies involved in livestock farming.</li>
|
| 270 |
+
</ul>
|
| 271 |
+
<a href="https://dahd.nic.in/" target="_blank">More Info</a>
|
| 272 |
+
</div>
|
| 273 |
+
|
| 274 |
+
<div>
|
| 275 |
+
<h3>3. Subsidy for Veterinary Health Services</h3>
|
| 276 |
+
<p><strong>Objective:</strong> This subsidy is aimed at improving livestock health by encouraging veterinary services, including disease control, vaccinations, and health diagnostics.</p>
|
| 277 |
+
<p><strong>Key Features:</strong></p>
|
| 278 |
+
<ul>
|
| 279 |
+
<li>Subsidy for setting up veterinary clinics and animal health centers.</li>
|
| 280 |
+
<li>Government funding for vaccination and disease control programs.</li>
|
| 281 |
+
</ul>
|
| 282 |
+
<p><strong>Benefits:</strong></p>
|
| 283 |
+
<ul>
|
| 284 |
+
<li>Reduced livestock mortality due to improved health and timely treatment.</li>
|
| 285 |
+
<li>Enhanced productivity and longevity of animals.</li>
|
| 286 |
+
</ul>
|
| 287 |
+
<p><strong>Eligibility:</strong></p>
|
| 288 |
+
<ul>
|
| 289 |
+
<li>Veterinarians, private organizations, and government entities offering livestock healthcare services.</li>
|
| 290 |
+
</ul>
|
| 291 |
+
<a href="https://dahd.nic.in/" target="_blank">More Info</a>
|
| 292 |
+
</div>
|
| 293 |
+
</div>
|
| 294 |
+
</div>
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<script>
|
| 298 |
+
function toggleContent(contentId) {
|
| 299 |
+
var content = document.getElementById(contentId);
|
| 300 |
+
if (content.style.display === "none" || content.style.display === "") {
|
| 301 |
+
content.style.display = "block";
|
| 302 |
+
} else {
|
| 303 |
+
content.style.display = "none";
|
| 304 |
+
}
|
| 305 |
+
}
|
| 306 |
+
</script>
|
| 307 |
+
</body>
|
| 308 |
+
</html>
|
templates/home.html
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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scale=1.0">
|
| 6 |
+
<title>AgroVet</title>
|
| 7 |
+
<style>
|
| 8 |
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');
|
| 9 |
+
|
| 10 |
+
* {
|
| 11 |
+
margin: 0;
|
| 12 |
+
padding: 0;
|
| 13 |
+
box-sizing: border-box;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
body {
|
| 17 |
+
font-family: 'Poppins', sans-serif;
|
| 18 |
+
height: 100vh;
|
| 19 |
+
display: flex;
|
| 20 |
+
justify-content: center;
|
| 21 |
+
align-items: center;
|
| 22 |
+
overflow: hidden;
|
| 23 |
+
position: relative;
|
| 24 |
+
}
|
| 25 |
+
|
| 26 |
+
/* Background Slider */
|
| 27 |
+
.background-slider {
|
| 28 |
+
position: fixed;
|
| 29 |
+
top: 0;
|
| 30 |
+
left: 0;
|
| 31 |
+
width: 100%;
|
| 32 |
+
height: 100%;
|
| 33 |
+
background-size: cover;
|
| 34 |
+
background-position: center;
|
| 35 |
+
animation: slide 15s infinite linear;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
@keyframes slide {
|
| 39 |
+
0%, 100% { background-image: url('/static/home.jpeg'); }
|
| 40 |
+
33% { background-image: url('/static/home.jpeg'); }
|
| 41 |
+
66% { background-image: url('/static/home.jpeg'); }
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
.container {
|
| 45 |
+
position: relative;
|
| 46 |
+
z-index: 1;
|
| 47 |
+
text-align: center;
|
| 48 |
+
background: rgba(0, 0, 0, 0.7);
|
| 49 |
+
padding: 30px;
|
| 50 |
+
border-radius: 15px;
|
| 51 |
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
|
| 52 |
+
width: 80%;
|
| 53 |
+
max-width: 800px;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
h1 {
|
| 57 |
+
font-size: 3em;
|
| 58 |
+
margin-bottom: 10px;
|
| 59 |
+
color: #ffcc29;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
p {
|
| 63 |
+
font-size: 1.3em;
|
| 64 |
+
margin-bottom: 30px;
|
| 65 |
+
color: #ddd;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.button-grid {
|
| 69 |
+
display: grid;
|
| 70 |
+
grid-template-columns: repeat(3, 1fr);
|
| 71 |
+
gap: 20px;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
.button {
|
| 75 |
+
background: linear-gradient(45deg, #00c9ff, #92fe9d);
|
| 76 |
+
color: white;
|
| 77 |
+
padding: 20px;
|
| 78 |
+
text-decoration: none;
|
| 79 |
+
border-radius: 10px;
|
| 80 |
+
font-size: 1.1em;
|
| 81 |
+
font-weight: bold;
|
| 82 |
+
text-align: center;
|
| 83 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
| 84 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.button:hover {
|
| 88 |
+
transform: translateY(-5px);
|
| 89 |
+
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
|
| 90 |
+
background: linear-gradient(45deg, #4facfe, #00f2fe);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
footer {
|
| 94 |
+
margin-top: 20px;
|
| 95 |
+
font-size: 0.9em;
|
| 96 |
+
color: #aaa;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
footer a {
|
| 100 |
+
color: #ffcc29;
|
| 101 |
+
text-decoration: none;
|
| 102 |
+
}
|
| 103 |
+
|
| 104 |
+
.language-select {
|
| 105 |
+
position: absolute;
|
| 106 |
+
top: 10px;
|
| 107 |
+
right: 20px;
|
| 108 |
+
}
|
| 109 |
+
</style>
|
| 110 |
+
</head>
|
| 111 |
+
<body>
|
| 112 |
+
<div class="background-slider"></div>
|
| 113 |
+
|
| 114 |
+
<div class="language-select">
|
| 115 |
+
<label for="language">Language:</label>
|
| 116 |
+
<select id="language" onchange="changeLanguage()">
|
| 117 |
+
<option value="en">English</option>
|
| 118 |
+
<option value="kn">Kannada</option>
|
| 119 |
+
<option value="hi">Hindi</option>
|
| 120 |
+
<option value="ta">Tamil</option>
|
| 121 |
+
<option value="te">Telugu</option>
|
| 122 |
+
</select>
|
| 123 |
+
</div>
|
| 124 |
+
|
| 125 |
+
<div class="container" id="content">
|
| 126 |
+
<h1 data-translate="AgroVet">AgroVet</h1>
|
| 127 |
+
<p data-translate='"Empowering Animal Rearing with Modern Solutions"'>"Empowering Animal Rearing with Modern Solutions"</p>
|
| 128 |
+
<div class="button-grid">
|
| 129 |
+
<a href="/rearing-guidance" class="button" data-translate="Rearing Guidance">Rearing Guidance</a>
|
| 130 |
+
<a href="/ai-chatbot" class="button" data-translate="AI Chatbot">AI Chatbot</a>
|
| 131 |
+
<a href="/disease-detection" class="button" data-translate="Disease Detection">Disease Detection</a>
|
| 132 |
+
<a href="/govt-schemes" class="button" data-translate="Govt Schemes">Govt Schemes</a>
|
| 133 |
+
<a href="/veterinary_map" class="button" data-translate="Veterinary Maps">veterinary map</a>
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<script>
|
| 138 |
+
document.addEventListener("DOMContentLoaded", function () {
|
| 139 |
+
const savedLanguage = localStorage.getItem("selectedLanguage") || "en";
|
| 140 |
+
document.getElementById("language").value = savedLanguage;
|
| 141 |
+
translatePage(savedLanguage);
|
| 142 |
+
});
|
| 143 |
+
|
| 144 |
+
function changeLanguage() {
|
| 145 |
+
const selectedLanguage = document.getElementById("language").value;
|
| 146 |
+
localStorage.setItem("selectedLanguage", selectedLanguage);
|
| 147 |
+
translatePage(selectedLanguage);
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
function translatePage(targetLanguage) {
|
| 151 |
+
const elements = document.querySelectorAll("[data-translate]");
|
| 152 |
+
|
| 153 |
+
if (targetLanguage === "en") {
|
| 154 |
+
elements.forEach((el) => {
|
| 155 |
+
el.innerText = el.getAttribute("data-translate");
|
| 156 |
+
});
|
| 157 |
+
return;
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
elements.forEach((el) => {
|
| 161 |
+
const originalText = el.getAttribute("data-translate");
|
| 162 |
+
fetch(`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${targetLanguage}&dt=t&q=${encodeURIComponent(originalText)}`)
|
| 163 |
+
.then((response) => response.json())
|
| 164 |
+
.then((data) => {
|
| 165 |
+
el.innerText = data[0][0][0];
|
| 166 |
+
})
|
| 167 |
+
.catch((error) => console.error("Translation error:", error));
|
| 168 |
+
});
|
| 169 |
+
}
|
| 170 |
+
</script>
|
| 171 |
+
</body>
|
| 172 |
+
</html>
|
templates/home1.html
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>AgroVet</title>
|
| 7 |
+
<style>
|
| 8 |
+
|
| 9 |
+
body {
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
font-family: 'Poppins', sans-serif;
|
| 13 |
+
height: 100vh;
|
| 14 |
+
display: flex;
|
| 15 |
+
justify-content: center;
|
| 16 |
+
align-items: center;
|
| 17 |
+
background: url('home.jpeg') no-repeat center center/cover;
|
| 18 |
+
color: #fff;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
.container {
|
| 23 |
+
text-align: center;
|
| 24 |
+
background: rgba(0, 0, 0, 0.7);
|
| 25 |
+
padding: 30px;
|
| 26 |
+
border-radius: 15px;
|
| 27 |
+
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
|
| 28 |
+
width: 80%;
|
| 29 |
+
max-width: 800px;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
h1 {
|
| 34 |
+
font-size: 3em;
|
| 35 |
+
margin-bottom: 10px;
|
| 36 |
+
color: #ffcc29;
|
| 37 |
+
}
|
| 38 |
+
p {
|
| 39 |
+
font-size: 1.3em;
|
| 40 |
+
margin-bottom: 30px;
|
| 41 |
+
color: #ddd;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
.button-grid {
|
| 46 |
+
display: grid;
|
| 47 |
+
grid-template-columns: repeat(3, 1fr);
|
| 48 |
+
gap: 20px;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
.button {
|
| 53 |
+
background: linear-gradient(45deg, #00c9ff, #92fe9d);
|
| 54 |
+
color: white;
|
| 55 |
+
padding: 20px;
|
| 56 |
+
text-decoration: none;
|
| 57 |
+
border-radius: 10px;
|
| 58 |
+
font-size: 1.1em;
|
| 59 |
+
font-weight: bold;
|
| 60 |
+
text-align: center;
|
| 61 |
+
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
|
| 62 |
+
transition: transform 0.3s, box-shadow 0.3s;
|
| 63 |
+
}
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
.button:hover {
|
| 67 |
+
transform: translateY(-5px);
|
| 68 |
+
box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
|
| 69 |
+
background: linear-gradient(45deg, #4facfe, #00f2fe);
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
footer {
|
| 73 |
+
margin-top: 20px;
|
| 74 |
+
font-size: 0.9em;
|
| 75 |
+
color: #aaa;
|
| 76 |
+
}
|
| 77 |
+
footer a {
|
| 78 |
+
color: #ffcc29;
|
| 79 |
+
text-decoration: none;
|
| 80 |
+
}
|
| 81 |
+
</style>
|
| 82 |
+
</head>
|
| 83 |
+
<body>
|
| 84 |
+
<div class="container">
|
| 85 |
+
<h1>AgroVet</h1>
|
| 86 |
+
<p>"Empowering Animal Rearing with Modern Solutions"</p>
|
| 87 |
+
<div class="button-grid">
|
| 88 |
+
<a href="/rearing-guidance" class="button">Rearing Guidance</a>
|
| 89 |
+
<a href="/ai-chatbot" class="button">AI Chatbot</a>
|
| 90 |
+
<a href="/disease-detection" class="button">Disease Detection</a>
|
| 91 |
+
<a href="information.html" class="button">Info Hub</a>
|
| 92 |
+
<a href="latest-innovations.html" class="button">Latest Innovations</a>
|
| 93 |
+
<a href="govt-schemes.html" class="button">Govt Schemes</a>
|
| 94 |
+
</div>
|
| 95 |
+
|
| 96 |
+
</div>
|
| 97 |
+
</body>
|
| 98 |
+
</html>
|
templates/s1.html
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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guidance</title>
|
| 7 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.0-alpha1/css/bootstrap.min.css">
|
| 8 |
+
<style>
|
| 9 |
+
body {
|
| 10 |
+
background-color: #FAF3E0;
|
| 11 |
+
font-family: 'Arial', sans-serif;
|
| 12 |
+
}
|
| 13 |
+
.container {
|
| 14 |
+
background-color: #ffffff;
|
| 15 |
+
border-radius: 10px;
|
| 16 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 17 |
+
padding: 30px;
|
| 18 |
+
}
|
| 19 |
+
.title-box {
|
| 20 |
+
background-color: #2C3E50;
|
| 21 |
+
color: #fff;
|
| 22 |
+
padding: 20px;
|
| 23 |
+
text-align: center;
|
| 24 |
+
border-radius: 8px;
|
| 25 |
+
margin-bottom: 20px;
|
| 26 |
+
}
|
| 27 |
+
.title-box h1 {
|
| 28 |
+
font-size: 2.5em;
|
| 29 |
+
margin-bottom: 10px;
|
| 30 |
+
color: #F5A623;
|
| 31 |
+
}
|
| 32 |
+
.title-box p {
|
| 33 |
+
font-size: 1.2em;
|
| 34 |
+
}
|
| 35 |
+
.form-select, .form-control {
|
| 36 |
+
border-radius: 8px;
|
| 37 |
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
| 38 |
+
}
|
| 39 |
+
.btn-primary {
|
| 40 |
+
background-color: #2C3E50;
|
| 41 |
+
border: none;
|
| 42 |
+
border-radius: 8px;
|
| 43 |
+
}
|
| 44 |
+
.btn-primary:hover {
|
| 45 |
+
background-color: #233140;
|
| 46 |
+
}
|
| 47 |
+
.result-card {
|
| 48 |
+
background-color: #ECF0F1;
|
| 49 |
+
border-radius: 10px;
|
| 50 |
+
padding: 20px;
|
| 51 |
+
margin-top: 20px;
|
| 52 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 53 |
+
}
|
| 54 |
+
.list-group-item {
|
| 55 |
+
background-color: #ffffff;
|
| 56 |
+
border: 1px solid #ddd;
|
| 57 |
+
color: #333;
|
| 58 |
+
font-size: 16px;
|
| 59 |
+
}
|
| 60 |
+
.list-group-item:hover {
|
| 61 |
+
background-color: #F5A623;
|
| 62 |
+
}
|
| 63 |
+
.highlight {
|
| 64 |
+
color: #2C3E50;
|
| 65 |
+
font-weight: bold;
|
| 66 |
+
}
|
| 67 |
+
.footer {
|
| 68 |
+
text-align: center;
|
| 69 |
+
margin-top: 30px;
|
| 70 |
+
font-size: 14px;
|
| 71 |
+
color: #888;
|
| 72 |
+
}
|
| 73 |
+
.animal-recommendation {
|
| 74 |
+
margin-top: 20px;
|
| 75 |
+
padding: 20px;
|
| 76 |
+
background-color: #f0f8ff;
|
| 77 |
+
border-radius: 8px;
|
| 78 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 79 |
+
}
|
| 80 |
+
</style>
|
| 81 |
+
</head>
|
| 82 |
+
<body>
|
| 83 |
+
<div class="language-select" style="position: absolute; top: 10px; right: 20px;">
|
| 84 |
+
<label for="language">Language:</label>
|
| 85 |
+
<select id="language" onchange="changeLanguage()">
|
| 86 |
+
<option value="en">English</option>
|
| 87 |
+
<option value="kn">Kannada</option>
|
| 88 |
+
<option value="hi">Hindi</option>
|
| 89 |
+
<option value="ta">Tamil</option>
|
| 90 |
+
<option value="te">Telugu</option>
|
| 91 |
+
</select>
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div class="container mt-5">
|
| 95 |
+
<div class="title-box">
|
| 96 |
+
<h1 data-translate="Personalized Animal Husbandry Guidance">Personalized Animal Husbandry Guidance</h1>
|
| 97 |
+
<p data-translate="Get tailored advice for your livestock needs">Get tailored advice for your livestock needs</p>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<form action="/result" method="POST">
|
| 101 |
+
<div class="mb-3">
|
| 102 |
+
<label for="animal_type" class="form-label" data-translate="Select Animal Type">Select Animal Type</label>
|
| 103 |
+
<select class="form-select" id="animal_type" name="animal_type" required>
|
| 104 |
+
<option value="Cow">Cow</option>
|
| 105 |
+
<option value="Buffalo">Buffalo</option>
|
| 106 |
+
<option value="Pig">Pig</option>
|
| 107 |
+
<option value="Goat">Goat</option>
|
| 108 |
+
<option value="Sheep">Sheep</option>
|
| 109 |
+
<option value="Poultry">Poultry</option>
|
| 110 |
+
<option value="Bee Hiving">Bee Hiving</option>
|
| 111 |
+
<option value="Sericulture">Sericulture</option>
|
| 112 |
+
</select>
|
| 113 |
+
</div>
|
| 114 |
+
|
| 115 |
+
<div class="mb-3">
|
| 116 |
+
<label for="number_of_animals" class="form-label" data-translate="Number of Animals">Number of Animals</label>
|
| 117 |
+
<input type="number" class="form-control" id="number_of_animals" name="number_of_animals" required>
|
| 118 |
+
</div>
|
| 119 |
+
|
| 120 |
+
<button type="submit" class="btn btn-primary w-100" data-translate="Get Guidance">Get Guidance</button>
|
| 121 |
+
</form>
|
| 122 |
+
|
| 123 |
+
{% if area_size %}
|
| 124 |
+
<div class="result-card">
|
| 125 |
+
<h3 class="text-center mb-4">Results for <span class="highlight">{{ animal_type }}</span> ({{ number_of_animals }} animals)</h3>
|
| 126 |
+
<ul class="list-group">
|
| 127 |
+
<li class="list-group-item">Area Required (sq ft): <span class="highlight">{{ area_size }}</span></li>
|
| 128 |
+
<li class="list-group-item">Feed Type: <span class="highlight">{{ feed_type }}</span></li>
|
| 129 |
+
<li class="list-group-item">Feed Quantity (kg/day): <span class="highlight">{{ feed_quantity }}</span></li>
|
| 130 |
+
<li class="list-group-item">Cost (INR): <span class="highlight">{{ cost_in_inr }}</span></li>
|
| 131 |
+
<li class="list-group-item">Water Supply (liters/day): <span class="highlight">{{ water_supply }}</span></li>
|
| 132 |
+
<li class="list-group-item">Hygiene Tips: <span class="highlight">{{ hygiene_tips }}</span></li>
|
| 133 |
+
<li class="list-group-item">Seasonal Tips: <span class="highlight">{{ seasonal_tips }}</span></li>
|
| 134 |
+
</ul>
|
| 135 |
+
</div>
|
| 136 |
+
{% endif %}
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<div class="footer">
|
| 140 |
+
<p data-translate="Personalized Animal Husbandry Guidance">Personalized Animal Husbandry Guidance</p>
|
| 141 |
+
</div>
|
| 142 |
+
|
| 143 |
+
<script>
|
| 144 |
+
document.addEventListener("DOMContentLoaded", function () {
|
| 145 |
+
const savedLanguage = localStorage.getItem("selectedLanguage") || "en";
|
| 146 |
+
document.getElementById("language").value = savedLanguage;
|
| 147 |
+
translatePage(savedLanguage);
|
| 148 |
+
});
|
| 149 |
+
|
| 150 |
+
function changeLanguage() {
|
| 151 |
+
const selectedLanguage = document.getElementById("language").value;
|
| 152 |
+
localStorage.setItem("selectedLanguage", selectedLanguage);
|
| 153 |
+
translatePage(selectedLanguage);
|
| 154 |
+
}
|
| 155 |
+
|
| 156 |
+
function translatePage(targetLanguage) {
|
| 157 |
+
const elements = document.querySelectorAll("[data-translate]");
|
| 158 |
+
elements.forEach((el) => {
|
| 159 |
+
const originalText = el.getAttribute("data-translate");
|
| 160 |
+
if (targetLanguage === "en") {
|
| 161 |
+
el.innerText = originalText;
|
| 162 |
+
} else {
|
| 163 |
+
fetch(`https://translate.googleapis.com/translate_a/single?client=gtx&sl=auto&tl=${targetLanguage}&dt=t&q=${encodeURIComponent(originalText)}`)
|
| 164 |
+
.then(response => response.json())
|
| 165 |
+
.then(data => el.innerText = data[0][0][0])
|
| 166 |
+
.catch(console.error);
|
| 167 |
+
}
|
| 168 |
+
});
|
| 169 |
+
}
|
| 170 |
+
</script>
|
| 171 |
+
</body>
|
| 172 |
+
</html>
|
templates/s2.html
ADDED
|
@@ -0,0 +1,244 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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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>AI Chatbot</title>
|
| 7 |
+
<style>
|
| 8 |
+
* {
|
| 9 |
+
margin: 0;
|
| 10 |
+
padding: 0;
|
| 11 |
+
box-sizing: border-box;
|
| 12 |
+
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
body {
|
| 16 |
+
min-height: 100vh;
|
| 17 |
+
display: flex;
|
| 18 |
+
align-items: center;
|
| 19 |
+
justify-content: center;
|
| 20 |
+
background: #FAF3E0; /* Light yellow background */
|
| 21 |
+
padding: 1rem;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.chat-container {
|
| 25 |
+
width: 100%;
|
| 26 |
+
max-width: 400px;
|
| 27 |
+
background: white;
|
| 28 |
+
border-radius: 1rem;
|
| 29 |
+
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
|
| 30 |
+
overflow: hidden;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
.chat-header {
|
| 34 |
+
display: flex;
|
| 35 |
+
align-items: center;
|
| 36 |
+
gap: 0.75rem;
|
| 37 |
+
padding: 1rem;
|
| 38 |
+
background: #2C3E50; /* Dark blue background */
|
| 39 |
+
color: white;
|
| 40 |
+
position: relative;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.header-info h1 {
|
| 44 |
+
font-size: 1.25rem;
|
| 45 |
+
font-weight: 600;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
.header-info p {
|
| 49 |
+
font-size: 0.875rem;
|
| 50 |
+
opacity: 0.9;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.chat-messages {
|
| 54 |
+
height: 500px;
|
| 55 |
+
overflow-y: auto;
|
| 56 |
+
padding: 1rem;
|
| 57 |
+
display: flex;
|
| 58 |
+
flex-direction: column;
|
| 59 |
+
gap: 1rem;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.message {
|
| 63 |
+
max-width: 80%;
|
| 64 |
+
padding: 0.75rem 1rem;
|
| 65 |
+
border-radius: 1rem;
|
| 66 |
+
word-wrap: break-word;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.user-message {
|
| 70 |
+
align-self: flex-start;
|
| 71 |
+
background: #ADD8E6; /* Light blue background */
|
| 72 |
+
border-top-left-radius: 0;
|
| 73 |
+
color: #333;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.bot-message {
|
| 77 |
+
align-self: flex-end;
|
| 78 |
+
background: #2C3E50; /* Dark blue background */
|
| 79 |
+
color: white;
|
| 80 |
+
border-top-right-radius: 0;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
.chat-input {
|
| 84 |
+
padding: 1rem;
|
| 85 |
+
border-top: 1px solid #eee;
|
| 86 |
+
display: flex;
|
| 87 |
+
gap: 0.5rem;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.chat-input input {
|
| 91 |
+
flex: 1;
|
| 92 |
+
padding: 0.75rem;
|
| 93 |
+
border: 1px solid #ddd;
|
| 94 |
+
border-radius: 0.5rem;
|
| 95 |
+
outline: none;
|
| 96 |
+
font-size: 0.875rem;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
.chat-input input:focus {
|
| 100 |
+
border-color: #2C3E50;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
.send-btn {
|
| 104 |
+
background: #2C3E50; /* Dark blue background */
|
| 105 |
+
color: white;
|
| 106 |
+
border: none;
|
| 107 |
+
padding: 0.75rem;
|
| 108 |
+
border-radius: 0.5rem;
|
| 109 |
+
cursor: pointer;
|
| 110 |
+
display: flex;
|
| 111 |
+
align-items: center;
|
| 112 |
+
justify-content: center;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.send-btn:hover {
|
| 116 |
+
background: #1E4A7A; /* Darker blue on hover */
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.send-btn svg {
|
| 120 |
+
width: 1.25rem;
|
| 121 |
+
height: 1.25rem;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.language-selector {
|
| 125 |
+
margin-top: 10px;
|
| 126 |
+
padding: 5px;
|
| 127 |
+
background-color: #2C3E50; /* Dark blue background */
|
| 128 |
+
color: white;
|
| 129 |
+
border-radius: 5px;
|
| 130 |
+
text-align: center;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
.language-selector label {
|
| 134 |
+
margin-right: 10px;
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
.language-selector select {
|
| 138 |
+
padding: 5px;
|
| 139 |
+
border: none;
|
| 140 |
+
border-radius: 5px;
|
| 141 |
+
background-color: white;
|
| 142 |
+
color: #333;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
.loading {
|
| 146 |
+
text-align: center;
|
| 147 |
+
margin-top: 10px;
|
| 148 |
+
color: #2C3E50; /* Dark blue color */
|
| 149 |
+
}
|
| 150 |
+
|
| 151 |
+
@media (min-width: 768px) {
|
| 152 |
+
#chatbox {
|
| 153 |
+
height: 500px;
|
| 154 |
+
}
|
| 155 |
+
}
|
| 156 |
+
</style>
|
| 157 |
+
</head>
|
| 158 |
+
<body>
|
| 159 |
+
<div class="chat-container">
|
| 160 |
+
<div class="chat-header">
|
| 161 |
+
<div class="header-info">
|
| 162 |
+
<h1>AGRIBOT</h1>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
|
| 166 |
+
<div class="chat-messages" id="chatbox">
|
| 167 |
+
<div class="message bot-message">Hello! How can I help you today?</div>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<!-- Language Selection Dropdown -->
|
| 171 |
+
<div class="language-selector">
|
| 172 |
+
<label for="language">Select Language:</label>
|
| 173 |
+
<select id="language" name="language" onchange="updateLanguage()">
|
| 174 |
+
<option value="en">English</option>
|
| 175 |
+
<option value="kn">Kannada</option>
|
| 176 |
+
<option value="hi">Hindi</option>
|
| 177 |
+
<option value="te">Telugu</option>
|
| 178 |
+
<option value="ta">Tamil</option>
|
| 179 |
+
<option value="ml">Malayalam</option>
|
| 180 |
+
</select>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
<div class="chat-input">
|
| 184 |
+
<input type="text" id="userInput" placeholder="Type your message..." autocomplete="off">
|
| 185 |
+
<button class="send-btn" id="sendBtn">
|
| 186 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
| 187 |
+
<path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/>
|
| 188 |
+
</svg>
|
| 189 |
+
</button>
|
| 190 |
+
</div>
|
| 191 |
+
|
| 192 |
+
<div class="loading" id="loading" style="display: none;">Loading...</div>
|
| 193 |
+
</div>
|
| 194 |
+
|
| 195 |
+
<script>
|
| 196 |
+
const chatbox = document.getElementById("chatbox");
|
| 197 |
+
const userInput = document.getElementById("userInput");
|
| 198 |
+
const sendBtn = document.getElementById("sendBtn");
|
| 199 |
+
const loading = document.getElementById("loading");
|
| 200 |
+
|
| 201 |
+
// Add user and bot messages to chatbox
|
| 202 |
+
function addMessage(role, text) {
|
| 203 |
+
const messageDiv = document.createElement("div");
|
| 204 |
+
messageDiv.className = `message ${role}-message`;
|
| 205 |
+
messageDiv.textContent = text;
|
| 206 |
+
chatbox.appendChild(messageDiv);
|
| 207 |
+
chatbox.scrollTop = chatbox.scrollHeight;
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
// Send message to the server
|
| 211 |
+
sendBtn.addEventListener("click", async () => {
|
| 212 |
+
const userMessage = userInput.value.trim();
|
| 213 |
+
const language = document.getElementById("language").value; // Get selected language
|
| 214 |
+
if (!userMessage) return;
|
| 215 |
+
|
| 216 |
+
addMessage("user", userMessage);
|
| 217 |
+
userInput.value = "";
|
| 218 |
+
loading.style.display = "block"; // Show loading indicator
|
| 219 |
+
|
| 220 |
+
try {
|
| 221 |
+
const response = await fetch("/chat", {
|
| 222 |
+
method: "POST",
|
| 223 |
+
headers: {
|
| 224 |
+
"Content-Type": "application/json",
|
| 225 |
+
},
|
| 226 |
+
body: JSON.stringify({ message: userMessage, language: language }), // Include language
|
| 227 |
+
});
|
| 228 |
+
|
| 229 |
+
const data = await response.json();
|
| 230 |
+
addMessage("bot", data.response);
|
| 231 |
+
} catch (error) {
|
| 232 |
+
addMessage("bot", "Sorry, something went wrong!");
|
| 233 |
+
} finally {
|
| 234 |
+
loading.style.display = "none"; // Hide loading indicator
|
| 235 |
+
}
|
| 236 |
+
});
|
| 237 |
+
|
| 238 |
+
function updateLanguage() {
|
| 239 |
+
const language = document.getElementById("language").value;
|
| 240 |
+
window.location.href = `/ai-chatbot?language=${language}`;
|
| 241 |
+
}
|
| 242 |
+
</script>
|
| 243 |
+
</body>
|
| 244 |
+
</html>
|
templates/s3.html
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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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>Animal Disease Prediction</title>
|
| 7 |
+
<style>
|
| 8 |
+
body {
|
| 9 |
+
font-family: Arial, sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 20px;
|
| 12 |
+
background-color: #FAF3E0;
|
| 13 |
+
color: #333;
|
| 14 |
+
}
|
| 15 |
+
.container {
|
| 16 |
+
max-width: 900px;
|
| 17 |
+
margin: auto;
|
| 18 |
+
background: white;
|
| 19 |
+
padding: 20px;
|
| 20 |
+
border-radius: 10px;
|
| 21 |
+
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
| 22 |
+
}
|
| 23 |
+
h1 {
|
| 24 |
+
background-color: #2C3E50;
|
| 25 |
+
color: #fff;
|
| 26 |
+
padding: 20px;
|
| 27 |
+
text-align: center;
|
| 28 |
+
border-radius: 8px;
|
| 29 |
+
margin-bottom: 20px;
|
| 30 |
+
font-size: 2.5em;
|
| 31 |
+
}
|
| 32 |
+
p {
|
| 33 |
+
line-height: 1.6;
|
| 34 |
+
}
|
| 35 |
+
form {
|
| 36 |
+
background: #fff;
|
| 37 |
+
margin: 15px 0;
|
| 38 |
+
padding: 15px;
|
| 39 |
+
border-radius: 8px;
|
| 40 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 41 |
+
}
|
| 42 |
+
input[type="file"] {
|
| 43 |
+
margin-bottom: 10px;
|
| 44 |
+
}
|
| 45 |
+
button {
|
| 46 |
+
background-color: #2980B9;
|
| 47 |
+
color: #fff;
|
| 48 |
+
padding: 10px 20px;
|
| 49 |
+
border: none;
|
| 50 |
+
border-radius: 5px;
|
| 51 |
+
cursor: pointer;
|
| 52 |
+
margin-top: 10px;
|
| 53 |
+
}
|
| 54 |
+
button:hover {
|
| 55 |
+
background-color: #1F618D;
|
| 56 |
+
}
|
| 57 |
+
h3 {
|
| 58 |
+
color: #2980B9;
|
| 59 |
+
}
|
| 60 |
+
.error {
|
| 61 |
+
color: #E74C3C;
|
| 62 |
+
}
|
| 63 |
+
.language-selector {
|
| 64 |
+
position: absolute;
|
| 65 |
+
top: 10px;
|
| 66 |
+
right: 20px;
|
| 67 |
+
z-index: 1000; /* Ensure it's on top */
|
| 68 |
+
}
|
| 69 |
+
#camera-controls, #file-upload-controls {
|
| 70 |
+
display: none;
|
| 71 |
+
flex-direction: column;
|
| 72 |
+
align-items: center;
|
| 73 |
+
}
|
| 74 |
+
#option-buttons {
|
| 75 |
+
display: flex;
|
| 76 |
+
justify-content: center;
|
| 77 |
+
gap: 20px;
|
| 78 |
+
margin-bottom: 20px;
|
| 79 |
+
}
|
| 80 |
+
#video {
|
| 81 |
+
width: 100%;
|
| 82 |
+
max-width: 400px;
|
| 83 |
+
height: auto;
|
| 84 |
+
border: 1px solid #ccc;
|
| 85 |
+
border-radius: 5px;
|
| 86 |
+
margin-bottom: 10px;
|
| 87 |
+
background-color: #000;
|
| 88 |
+
}
|
| 89 |
+
#captured-image {
|
| 90 |
+
width: 224px;
|
| 91 |
+
height: 224px;
|
| 92 |
+
border: 1px solid #ccc;
|
| 93 |
+
border-radius: 5px;
|
| 94 |
+
object-fit: contain;
|
| 95 |
+
background-color: #f0f0f0;
|
| 96 |
+
margin-top: 10px;
|
| 97 |
+
display: none;
|
| 98 |
+
}
|
| 99 |
+
#canvas {
|
| 100 |
+
display: none;
|
| 101 |
+
}
|
| 102 |
+
</style>
|
| 103 |
+
</head>
|
| 104 |
+
<body>
|
| 105 |
+
<div class="language-selector">
|
| 106 |
+
<label for="language">Language:</label>
|
| 107 |
+
<select id="language" onchange="changeLanguageViaBackend()">
|
| 108 |
+
<option value="en" selected>English</option>
|
| 109 |
+
<option value="kn">ಕನ್ನಡ</option>
|
| 110 |
+
<option value="hi">हिंदी</option>
|
| 111 |
+
<option value="ta">தமிழ்</option>
|
| 112 |
+
<option value="te">తెలుగు</option>
|
| 113 |
+
</select>
|
| 114 |
+
</div>
|
| 115 |
+
|
| 116 |
+
<div class="container">
|
| 117 |
+
<h1>Animal Disease Prediction</h1>
|
| 118 |
+
<p>
|
| 119 |
+
Choose an option to upload an image of the animal to detect diseases and get preventive measures.
|
| 120 |
+
</p>
|
| 121 |
+
|
| 122 |
+
<div id="option-buttons">
|
| 123 |
+
<button id="show-camera" type="button">Take a Photo</button>
|
| 124 |
+
<button id="show-upload" type="button">Upload a File</button>
|
| 125 |
+
</div>
|
| 126 |
+
|
| 127 |
+
<form id="prediction-form" method="POST" enctype="multipart/form-data">
|
| 128 |
+
|
| 129 |
+
<div id="camera-controls">
|
| 130 |
+
<video id="video" autoplay></video>
|
| 131 |
+
<button id="capture-photo" type="button">Capture Photo</button>
|
| 132 |
+
<img id="captured-image" src="" alt="Captured Image">
|
| 133 |
+
</div>
|
| 134 |
+
|
| 135 |
+
<div id="file-upload-controls">
|
| 136 |
+
<input type="file" name="file" id="file-input" accept="image/*">
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<button type="submit" id="predict-button" style="display: none;">Predict Disease</button>
|
| 140 |
+
</form>
|
| 141 |
+
|
| 142 |
+
{% if img_data %}
|
| 143 |
+
<h3>Uploaded Image:</h3>
|
| 144 |
+
<img src="data:image/png;base64,{{ img_data }}" alt="Uploaded Image" style="width: 224px; height: 224px;">
|
| 145 |
+
{% endif %}
|
| 146 |
+
|
| 147 |
+
{% if prediction %}
|
| 148 |
+
<h3>Prediction:</h3>
|
| 149 |
+
<p>{{ prediction }}</p>
|
| 150 |
+
<p>Confidence Score:</p>
|
| 151 |
+
<p>{{ confidence }}</p>
|
| 152 |
+
|
| 153 |
+
{% if medication %}
|
| 154 |
+
<h4>Suggested Medication:</h4>
|
| 155 |
+
<p>{{ medication }}</p>
|
| 156 |
+
{% else %}
|
| 157 |
+
<p>No medication suggestion available for this condition.</p>
|
| 158 |
+
{% endif %}
|
| 159 |
+
{% endif %}
|
| 160 |
+
|
| 161 |
+
{% if error %}
|
| 162 |
+
<p class="error">{{ error }}</p>
|
| 163 |
+
{% endif %}
|
| 164 |
+
|
| 165 |
+
<canvas id="canvas"></canvas>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<script>
|
| 169 |
+
// Function to change language via Flask backend (sets cookie and reloads page)
|
| 170 |
+
// IMPORTANT: The /set_language route needs to be added back to your app.py
|
| 171 |
+
// OR, if you are truly abandoning all server-side translation, you should remove this JS function
|
| 172 |
+
// and its onchange call from the select element.
|
| 173 |
+
function changeLanguageViaBackend() {
|
| 174 |
+
const selectedLanguage = document.getElementById("language").value;
|
| 175 |
+
// This route requires Flask-Babel or a custom implementation to set the language.
|
| 176 |
+
// If you're completely removing server-side language handling, this line will cause an error.
|
| 177 |
+
// For now, I'm leaving it as-is, assuming you might re-implement a simple language cookie setter.
|
| 178 |
+
window.location.href = `/set_language/${selectedLanguage}?next=${window.location.pathname}`;
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
// --- Camera and File Upload Logic (from previous response, adapted) ---
|
| 182 |
+
const showCameraButton = document.getElementById('show-camera');
|
| 183 |
+
const showUploadButton = document.getElementById('show-upload');
|
| 184 |
+
const cameraControls = document.getElementById('camera-controls');
|
| 185 |
+
const fileUploadControls = document.getElementById('file-upload-controls');
|
| 186 |
+
const video = document.getElementById('video');
|
| 187 |
+
const capturePhotoButton = document.getElementById('capture-photo');
|
| 188 |
+
const capturedImage = document.getElementById('captured-image');
|
| 189 |
+
const predictButton = document.getElementById('predict-button');
|
| 190 |
+
const canvas = document.getElementById('canvas');
|
| 191 |
+
const fileInput = document.getElementById('file-input');
|
| 192 |
+
const context = canvas.getContext('2d');
|
| 193 |
+
let currentStream;
|
| 194 |
+
|
| 195 |
+
function resetControls() {
|
| 196 |
+
cameraControls.style.display = 'none';
|
| 197 |
+
fileUploadControls.style.display = 'none';
|
| 198 |
+
predictButton.style.display = 'none';
|
| 199 |
+
capturedImage.style.display = 'none';
|
| 200 |
+
capturedImage.src = '';
|
| 201 |
+
fileInput.value = null; // Clear selected file
|
| 202 |
+
|
| 203 |
+
if (currentStream) {
|
| 204 |
+
currentStream.getTracks().forEach(track => track.stop());
|
| 205 |
+
video.srcObject = null;
|
| 206 |
+
currentStream = null;
|
| 207 |
+
}
|
| 208 |
+
}
|
| 209 |
+
|
| 210 |
+
showCameraButton.addEventListener('click', async () => {
|
| 211 |
+
resetControls();
|
| 212 |
+
cameraControls.style.display = 'flex';
|
| 213 |
+
try {
|
| 214 |
+
currentStream = await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
|
| 215 |
+
video.srcObject = currentStream;
|
| 216 |
+
video.style.display = 'block';
|
| 217 |
+
capturePhotoButton.style.display = 'block';
|
| 218 |
+
} catch (err) {
|
| 219 |
+
console.error("Error accessing the camera: ", err);
|
| 220 |
+
alert("Could not access camera. Please ensure you have a webcam and granted permissions.");
|
| 221 |
+
}
|
| 222 |
+
});
|
| 223 |
+
|
| 224 |
+
showUploadButton.addEventListener('click', () => {
|
| 225 |
+
resetControls();
|
| 226 |
+
fileUploadControls.style.display = 'flex';
|
| 227 |
+
// If file input has a file, show predict button immediately
|
| 228 |
+
if (fileInput.files.length > 0) {
|
| 229 |
+
predictButton.style.display = 'block';
|
| 230 |
+
}
|
| 231 |
+
});
|
| 232 |
+
|
| 233 |
+
capturePhotoButton.addEventListener('click', () => {
|
| 234 |
+
canvas.width = video.videoWidth;
|
| 235 |
+
canvas.height = video.videoHeight;
|
| 236 |
+
context.drawImage(video, 0, 0, canvas.width, canvas.height);
|
| 237 |
+
const imageDataURL = canvas.toDataURL('image/jpeg');
|
| 238 |
+
capturedImage.src = imageDataURL;
|
| 239 |
+
capturedImage.style.display = 'block';
|
| 240 |
+
predictButton.style.display = 'block'; // Show predict button after capture
|
| 241 |
+
video.style.display = 'none';
|
| 242 |
+
capturePhotoButton.style.display = 'none';
|
| 243 |
+
|
| 244 |
+
if (currentStream) {
|
| 245 |
+
currentStream.getTracks().forEach(track => track.stop());
|
| 246 |
+
video.srcObject = null;
|
| 247 |
+
}
|
| 248 |
+
});
|
| 249 |
+
|
| 250 |
+
fileInput.addEventListener('change', () => {
|
| 251 |
+
if (fileInput.files.length > 0) {
|
| 252 |
+
predictButton.style.display = 'block';
|
| 253 |
+
// Display a preview of the uploaded image (optional but good UX)
|
| 254 |
+
const reader = new FileReader();
|
| 255 |
+
reader.onload = function(e) {
|
| 256 |
+
capturedImage.src = e.target.result;
|
| 257 |
+
capturedImage.style.display = 'block';
|
| 258 |
+
};
|
| 259 |
+
reader.readAsDataURL(fileInput.files[0]);
|
| 260 |
+
} else {
|
| 261 |
+
predictButton.style.display = 'none';
|
| 262 |
+
capturedImage.style.display = 'none';
|
| 263 |
+
capturedImage.src = '';
|
| 264 |
+
}
|
| 265 |
+
});
|
| 266 |
+
|
| 267 |
+
document.getElementById('prediction-form').addEventListener('submit', async function(event) {
|
| 268 |
+
event.preventDefault();
|
| 269 |
+
|
| 270 |
+
const formData = new FormData();
|
| 271 |
+
let hasFile = false;
|
| 272 |
+
|
| 273 |
+
// Priority: Captured image from camera
|
| 274 |
+
if (capturedImage.src && capturedImage.style.display === 'block' && video.style.display === 'none') {
|
| 275 |
+
try {
|
| 276 |
+
const response = await fetch(capturedImage.src);
|
| 277 |
+
const blob = await response.blob();
|
| 278 |
+
formData.append('file', blob, 'captured_image.jpeg');
|
| 279 |
+
hasFile = true;
|
| 280 |
+
} catch (error) {
|
| 281 |
+
alert("Error preparing captured image for upload.");
|
| 282 |
+
console.error('Error fetching blob from captured image:', error);
|
| 283 |
+
return;
|
| 284 |
+
}
|
| 285 |
+
}
|
| 286 |
+
// Fallback: File from file input
|
| 287 |
+
else if (fileInput.files.length > 0) {
|
| 288 |
+
formData.append('file', fileInput.files[0]);
|
| 289 |
+
hasFile = true;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
if (!hasFile) {
|
| 293 |
+
alert("Please take a photo or select a file first.");
|
| 294 |
+
return;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
try {
|
| 298 |
+
const response = await fetch(event.target.action, {
|
| 299 |
+
method: event.target.method,
|
| 300 |
+
body: formData,
|
| 301 |
+
});
|
| 302 |
+
|
| 303 |
+
if (response.ok) {
|
| 304 |
+
const htmlResponse = await response.text();
|
| 305 |
+
// Replacing the whole container re-renders the page with new data
|
| 306 |
+
document.querySelector('.container').innerHTML = new DOMParser().parseFromString(htmlResponse, 'text/html').querySelector('.container').innerHTML;
|
| 307 |
+
} else {
|
| 308 |
+
const errorText = await response.text();
|
| 309 |
+
console.error('Server error:', response.status, errorText);
|
| 310 |
+
alert("An error occurred during prediction.");
|
| 311 |
+
}
|
| 312 |
+
} catch (error) {
|
| 313 |
+
console.error('Fetch error:', error);
|
| 314 |
+
alert("An error occurred while connecting to the server.");
|
| 315 |
+
}
|
| 316 |
+
});
|
| 317 |
+
|
| 318 |
+
// Initialize state on page load
|
| 319 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 320 |
+
resetControls(); // Start with all prediction controls hidden
|
| 321 |
+
});
|
| 322 |
+
</script>
|
| 323 |
+
</body>
|
| 324 |
+
</html>
|
templates/veterinary_map.html
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Nearby Veterinary Hospitals</title>
|
| 6 |
+
<style>
|
| 7 |
+
body {
|
| 8 |
+
background-color: #FAF3E0;
|
| 9 |
+
font-family: 'Arial', sans-serif;
|
| 10 |
+
margin: 0;
|
| 11 |
+
padding: 0;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
.container {
|
| 15 |
+
max-width: 900px;
|
| 16 |
+
margin: 50px auto;
|
| 17 |
+
background-color: #ffffff;
|
| 18 |
+
border-radius: 10px;
|
| 19 |
+
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
| 20 |
+
padding: 30px;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
.title-box {
|
| 24 |
+
background-color: #2C3E50;
|
| 25 |
+
color: #fff;
|
| 26 |
+
padding: 20px;
|
| 27 |
+
text-align: center;
|
| 28 |
+
border-radius: 8px;
|
| 29 |
+
margin-bottom: 20px;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
.title-box h1 {
|
| 33 |
+
font-size: 2.5em;
|
| 34 |
+
margin-bottom: 10px;
|
| 35 |
+
color: #F5A623;
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.title-box p {
|
| 39 |
+
font-size: 1.2em;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.map-btn {
|
| 43 |
+
background-color: #2C3E50;
|
| 44 |
+
color: #fff;
|
| 45 |
+
padding: 12px 24px;
|
| 46 |
+
font-size: 16px;
|
| 47 |
+
border: none;
|
| 48 |
+
border-radius: 8px;
|
| 49 |
+
cursor: pointer;
|
| 50 |
+
transition: background-color 0.3s ease;
|
| 51 |
+
margin-top: 20px;
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
.map-btn:hover {
|
| 55 |
+
background-color: #233140;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
iframe {
|
| 59 |
+
width: 100%;
|
| 60 |
+
height: 400px;
|
| 61 |
+
border: 0;
|
| 62 |
+
border-radius: 12px;
|
| 63 |
+
margin-top: 30px;
|
| 64 |
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
| 65 |
+
}
|
| 66 |
+
|
| 67 |
+
.footer {
|
| 68 |
+
text-align: center;
|
| 69 |
+
margin-top: 30px;
|
| 70 |
+
font-size: 14px;
|
| 71 |
+
color: #888;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
@media (max-width: 600px) {
|
| 75 |
+
.title-box h1 {
|
| 76 |
+
font-size: 1.8em;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.map-btn {
|
| 80 |
+
width: 100%;
|
| 81 |
+
}
|
| 82 |
+
|
| 83 |
+
iframe {
|
| 84 |
+
height: 300px;
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
</style>
|
| 88 |
+
</head>
|
| 89 |
+
<body>
|
| 90 |
+
<div class="container">
|
| 91 |
+
<div class="title-box">
|
| 92 |
+
<h1>Find Nearby Vet Hospitals</h1>
|
| 93 |
+
<p>Click the button to view veterinary hospitals near you</p>
|
| 94 |
+
</div>
|
| 95 |
+
|
| 96 |
+
<div style="text-align: center;">
|
| 97 |
+
<button class="map-btn" onclick="findVetHospitals()">Locate Vet Hospitals</button>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<!-- Static Embedded Map -->
|
| 101 |
+
<iframe
|
| 102 |
+
src="https://www.google.com/maps?q=Shimoga+Veterinary+Hospital&output=embed"
|
| 103 |
+
allowfullscreen
|
| 104 |
+
loading="lazy"
|
| 105 |
+
referrerpolicy="no-referrer-when-downgrade">
|
| 106 |
+
</iframe>
|
| 107 |
+
|
| 108 |
+
<div class="footer">© 2025 AgroVet Hub – All Rights Reserved</div>
|
| 109 |
+
</div>
|
| 110 |
+
|
| 111 |
+
<script>
|
| 112 |
+
function findVetHospitals() {
|
| 113 |
+
if (navigator.geolocation) {
|
| 114 |
+
navigator.geolocation.getCurrentPosition(function(position) {
|
| 115 |
+
let lat = position.coords.latitude;
|
| 116 |
+
let lng = position.coords.longitude;
|
| 117 |
+
let mapsUrl = `https://www.google.com/maps/search/Veterinary+Hospitals+shimoga/@${lat},${lng},15z`;
|
| 118 |
+
window.open(mapsUrl, '_blank');
|
| 119 |
+
}, function(error) {
|
| 120 |
+
alert('Error: Please allow location access to use this feature.');
|
| 121 |
+
});
|
| 122 |
+
} else {
|
| 123 |
+
alert('Geolocation is not supported by your browser.');
|
| 124 |
+
}
|
| 125 |
+
}
|
| 126 |
+
</script>
|
| 127 |
+
</body>
|
| 128 |
+
</html>
|