-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
132 lines (115 loc) · 4.77 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap demo</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">
</head>
<style>
h1 {
color: mediumseagreen;
text-align: center;
}
.warning {
color: red;
font-weight: bold;
text-align: center;
}
.card{
margin-left:410px;
margin-top: 20px;
color: white;
}
.container{
background:#edf2f7;
font-weight: bold;
padding-bottom:10px;
border-radius: 15px;
}
</style>
<body style="background:#BCBBB8">
<!--=======================navbar=====================================================-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="/">Crop Recommendation</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link disabled">About</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<!--==========================================================================================-->
<div class="container my-3 mt-3">
<h1 class="text-success">Crop Recommendation System <span class="text-success">🌱</span></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 step="0">
</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 step="00">
</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 step="0">
</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 step="0">
</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 step="0">
</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 step="0">
</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 bg-dark" style="width: 18rem;">
<img src="{{url_for('static', filename='img.jpg')}}" 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>