-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
181 lines (158 loc) · 4.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Crop Recommendation System</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-KK94CHFLLe+nY2dmCWGMq91rCGa5gtU4mk92HdvYe+M/SXH301p5ILy+dN9+nJOZ" crossorigin="anonymous">
<style>
/* Custom Theme Styles */
body {
background: linear-gradient(to bottom, #c5e1a5, #7cb342);
color: #333;
font-family: Arial, sans-serif;
}
h1 {
color: #ffffff;
text-align: center;
margin-top: 20px;
font-size: 2.5rem;
}
.navbar {
background-color: #4e7d34;
}
.navbar-brand {
font-weight: bold;
color: #ffffff;
}
.navbar-brand:hover {
color: #ffeb3b;
}
.container {
background: #f5f5f5;
border-radius: 15px;
padding: 20px;
margin-top: 20px;
}
label {
font-weight: bold;
color: #4e7d34;
}
.form-control {
border-radius: 50px;
padding: 10px 20px;
font-size: 1rem;
color: #333;
}
.form-control:focus {
outline: none;
border-color: #7cb342;
box-shadow: 0 0 5px #7cb342;
}
.btn-primary {
background-color: #4e7d34;
border-color: #4e7d34;
padding: 10px 20px;
border-radius: 50px;
font-size: 1.2rem;
transition: background-color 0.3s ease;
}
.btn-primary:hover {
background-color: #6abf4b;
border-color: #6abf4b;
}
.card {
margin: 20px auto;
background-color: #4e7d34;
color: #ffffff;
border-radius: 15px;
padding: 20px;
max-width: 400px;
}
.card-title {
font-size: 1.5rem;
font-weight: bold;
color: #ffeb3b;
}
.card-text {
font-size: 1.2rem;
margin-top: 10px;
}
</style>
</head>
<body>
<!--=======================navbar=====================================================-->
<nav class="navbar navbar-expand-lg">
<div class="container-fluid">
<a class="navbar-brand" href="/">Crop Recommendation System Using Machine Learning</a>
</div>
</nav>
<!--==========================================================================================-->
<div class="container">
<h1 style="color: black;">Crop Recommendation System 🌱</h1>
<!-- Adding form -->
<form action="/predict" method="POST">
<div class="row">
<div class="col-md-4">
<label for="Nitrogen">Nitrogen</label>
<input type="number" id="Nitrogen" name="Nitrogen" placeholder="Enter Nitrogen" class="form-control"
required>
</div>
<div class="col-md-4">
<label for="Phosporus">Phosphorus</label>
<input type="number" id="Phosporus" name="Phosporus" placeholder="Enter Phosphorus"
class="form-control" required>
</div>
<div class="col-md-4">
<label for="Potassium">Potassium</label>
<input type="number" id="Potassium" name="Potassium" placeholder="Enter Potassium"
class="form-control" required>
</div>
</div>
<div class="row mt-4">
<div class="col-md-4">
<label for="Temperature">Temperature</label>
<input type="number" step="0.01" id="Temperature" name="Temperature"
placeholder="Enter Temperature in °C" class="form-control" required>
</div>
<div class="col-md-4">
<label for="Humidity">Humidity</label>
<input type="number" step="0.01" id="Humidity" name="Humidity" placeholder="Enter Humidity in %"
class="form-control" required>
</div>
<div class="col-md-4">
<label for="pH">pH</label>
<input type="number" step="0.01" id="pH" name="pH" placeholder="Enter pH value" class="form-control"
required>
</div>
</div>
<div class="row mt-4">
<div class="col-md-4">
<label for="Rainfall">Rainfall</label>
<input type="number" step="0.01" id="Rainfall" name="Rainfall" placeholder="Enter Rainfall in mm"
class="form-control" required>
</div>
</div>
<div class="row mt-4">
<div class="col-md-12 text-center">
<button type="submit" class="btn btn-primary btn-lg">Get Recommendation</button>
</div>
</div>
</form>
{% if result %}
<div class="card">
<img src="{{url_for('static', filename='crop.png')}}" style="width: 70px; height: 70px;"
class="card-img-top" alt="...">
<div class="card-body">
<h5 class="card-title">Recommend Crop for Cultivation is:</h5>
<p class="card-text">{{ result }} </p>
</div>
</div>
{% endif %}
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-ENjdO4Dr2bkBIFxQpeoTz1HIcje39Wm4jDKdf19U8gI4ddQ3GYNS7NTKfAdVQSZe"
crossorigin="anonymous"></script>
</body>
</html>