Skip to content

Commit

Permalink
Merge pull request #8 from Rc17git/master
Browse files Browse the repository at this point in the history
added a home page the routes to every tab on the website, the home page also explain what the iris data is about and what the website does. The home page consists of an iris image and a button that routes to the prediction page
  • Loading branch information
kittupriyatham authored Dec 15, 2023
2 parents a6bc930 + 54f62ef commit e0f4446
Show file tree
Hide file tree
Showing 6,661 changed files with 1,526,940 additions and 19 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file added .DS_Store
Binary file not shown.
Binary file added __pycache__/MachineLearningCode.cpython-39.pyc
Binary file not shown.
Binary file added __pycache__/app.cpython-39.pyc
Binary file not shown.
13 changes: 10 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def hello_world():
docstring
"""
print("Hello World!")
return render_template("index.html")
return render_template("home.html")


@app.route('/predict', methods=['POST'])
@app.route('/predict', methods=['GET','POST'])
def predictandoutput():
"""
docstring
Expand Down Expand Up @@ -56,8 +56,15 @@ def about():
"""
return render_template("about.html")

@app.route('/prediction')
def prediction():
"""
docstring
"""
return render_template("index.html")


# app run

if __name__ == '__main__':
app.run(debug=True)
app.run(debug=True)
Binary file added static/images/iries.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions templates/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="/home">Home</a>
<a class="nav-item nav-link active" href="/prediction">Prediction</a>
<!-- <a class="nav-item nav-link active" href="#">Home <span class="sr-only">(current)</span></a> -->
<a class="nav-item nav-link" href="/dashboard">Dashboard</a>
<a class="nav-item nav-link active" href="">About <span class="sr-only">(current)</span></a>
Expand Down
1 change: 1 addition & 0 deletions templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="/home">Home</a>
<a class="nav-item nav-link active" href="/prediction">Prediction</a>
<a class="nav-item nav-link active" href="">Dashboard<span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="/about">About</a>
<a class="nav-item nav-link" href="https://potluri-krishna-priyatham.azurewebsites.net/projects">Portfolio</a>
Expand Down
113 changes: 113 additions & 0 deletions templates/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="../static/images/logo.jpg">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">

<title>IRIS Classification</title>
<style>
body {
font-family: 'Lato', sans-serif;
}

h1 {
margin-bottom: 40px;
}

label {
color: #333;
}

.btn-send {
font-weight: 300;
text-transform: uppercase;
letter-spacing: 0.2em;
width: 80%;
margin-left: 3px;
}

.btn-predict {
font-weight: 300;
text-transform: uppercase;
letter-spacing: 0.2em;
width: 80%;
margin-left: 3px;
margin-bottom: 20px;
}

.help-block.with-errors {
color: #ff5050;
margin-top: 5px;
}

.card {
margin-left: 10px;
margin-right: 10px;
}

.iris-image {
max-width: 80%; /* Adjusted the max-width for the image */
height: auto;
margin-bottom: 20px; /* Increased margin at the bottom of the image */
}

/* Added styles for increased spacing between headings */
h4 {
margin-top: 20px;
margin-bottom: 10px;
}

p {
margin-bottom: 10px;
}
</style>
</head>

<body style="background: #87ceeb">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/home">IRIS-C</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="/home">Home</a>
<a class="nav-item nav-link" href="/prediction">Prediction</a>
<a class="nav-item nav-link" href="/dashboard">Dashboard</a>
<a class="nav-item nav-link" href="/about">About</a>
<a class="nav-item nav-link" href="https://potluri-krishna-priyatham.azurewebsites.net/projects">Portfolio</a>
<a class="nav-item nav-link" href="https://github.com/kittupriyatham/Machine-Learning-Model-Deployment" target="_blank">Repository</a>
</div>
</div>
</nav>

<div class="container">
<div class=" text-center mt-5 ">
<h2>IRIS Classification</h2>
<p>Discover the fascinating world of iris flowers with our IRIS-C web application. Using cutting-edge machine learning models, this platform empowers you to predict the species of iris flowers based on their sepal and petal characteristics.</p>
<img src="static/images/iries.jpeg" alt="Iris Image" class="iris-image">
<h4>About IRIS Data</h4>
<p>The predictive magic begins with a dataset containing four features: sepal length, sepal width, petal length, and petal width. These measurements provide crucial insights into the unique attributes of iris flowers, forming the foundation for our machine learning algorithms.</p>
<h4>Classes of Iris Flowers</h4>
<p>Our models are trained to classify iris flowers into three distinct classes:</p>
<ol>
<li><strong>Setosa:</strong> Known for its distinctive appearance, the Setosa iris is characterized by its smaller size and unique petal shape.</li>
<li><strong>Versicolor:</strong> With moderate sepal and petal dimensions, the Versicolor iris displays a captivating blend of colors.</li>
<li><strong>Virginica:</strong> The Virginica iris, the largest of the three, boasts elongated sepals and petals, setting it apart with elegance.</li>
</ol>
<p>Ready to predict which species your iris flower belong to? Click below to start predicting!.</p>
<button class="btn btn-primary btn-predict" onclick="window.location.href='/prediction'">Let's Predict</button>
</div>
</div>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
</body>
</html>
31 changes: 16 additions & 15 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,21 +44,22 @@
</head>

<body style="background: #87ceeb">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="/home">IRIS-C</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="">Home <span class="sr-only">(current)</span></a>
<a class="nav-item nav-link" href="/dashboard">Dashboard</a>
<a class="nav-item nav-link" href="/about">About</a>
<a class="nav-item nav-link" href="https://potluri-krishna-priyatham.azurewebsites.net/projects">Portfolio</a>
<a class="nav-item nav-link" href="https://github.com/kittupriyatham/Machine-Learning-Model-Deployment" target="_blank">Repository</a>
</div>
</div>
</nav>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">IRIS-C</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link" href="/">Home</a> <!-- Updated link to "/" -->
<a class="nav-item nav-link active" href="/prediction">Prediction</a>
<a class="nav-item nav-link" href="/dashboard">Dashboard</a>
<a class="nav-item nav-link" href="/about">About</a>
<a class="nav-item nav-link" href="https://potluri-krishna-priyatham.azurewebsites.net/projects">Portfolio</a>
<a class="nav-item nav-link" href="https://github.com/kittupriyatham/Machine-Learning-Model-Deployment" target="_blank">Repository</a>
</div>
</div>
</nav>
<div class="container"> <div class=" text-center mt-5 ">
<h2>IRIS Classification</h2>
</div>
Expand Down
3 changes: 2 additions & 1 deletion templates/result.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="/home">Home</a>
<a class="nav-item nav-link active" href="/prediction">Prediction</a>
<a class="nav-item nav-link" href="/dashboard">Dashboard</a>
<a class="nav-item nav-link" href="/about">About</a>
<a class="nav-item nav-link" href="https://potluri-krishna-priyatham.azurewebsites.net/projects">Portfolio</a>
Expand All @@ -70,7 +71,7 @@ <h2>IRIS Classification</h2>
<div class="container">
<p>Predicted Value and its accuracy are:</p>
<p id="result">{{ Predicted_flower_name }}, {{ Accuracy_of_prediction }}%</p>
<input type="button" value="Go Back" onclick="location.href='/home'">
<input type="button" value="Go Back" onclick="location.href='/prediction'">
</div>
</div>
</div> <!-- /.8 -->
Expand Down
Loading

0 comments on commit e0f4446

Please sign in to comment.