simar007 commited on
Commit
d71535a
·
verified ·
1 Parent(s): ccb2f7d

Update templates/dashboard.html

Browse files
Files changed (1) hide show
  1. templates/dashboard.html +19 -6
templates/dashboard.html CHANGED
@@ -47,7 +47,7 @@
47
  </section>
48
 
49
  <!-- 🔹 Iris Prediction Form -->
50
- <section aria-labelledby="predict-title">
51
  <h3 id="predict-title">Iris Flower Predictor</h3>
52
  <form method="POST" action="{{ url_for('predict') }}">
53
  <input type="number" step="0.1" name="sepal_length" placeholder="Sepal Length" required>
@@ -58,10 +58,14 @@
58
  </form>
59
 
60
  {% if prediction %}
61
- <div class="prediction-box">
62
- The predicted flower species is: <strong>{{ prediction }}</strong>
63
- </div>
64
- {% endif %}
 
 
 
 
65
  </section>
66
 
67
  <section class="contact">
@@ -73,8 +77,8 @@
73
  <button class="logout-btn">Logout</button>
74
  </a>
75
  </div>
 
76
  <style>
77
- /* Copied inline styles from your uploaded dashboard */
78
  body {
79
  background: #f5f7fa;
80
  color: #333;
@@ -114,5 +118,14 @@
114
  .contact a:hover { background: #5a67ff; color: white; box-shadow: 0 8px 20px rgba(90,103,255,0.6); }
115
  .logout-btn { margin: 40px auto 0; display: block; background: #ff5c5c; color: white; font-weight: 700; border: none; padding: 14px 28px; border-radius: 30px; cursor: pointer; box-shadow: 0 6px 12px rgba(255,92,92,0.4); transition: background-color 0.3s ease; }
116
  .logout-btn:hover { background: #e04545; }
 
 
117
  </style>
 
 
 
 
 
 
 
118
  {% endblock %}
 
47
  </section>
48
 
49
  <!-- 🔹 Iris Prediction Form -->
50
+ <section aria-labelledby="predict-title" id="predict-section">
51
  <h3 id="predict-title">Iris Flower Predictor</h3>
52
  <form method="POST" action="{{ url_for('predict') }}">
53
  <input type="number" step="0.1" name="sepal_length" placeholder="Sepal Length" required>
 
58
  </form>
59
 
60
  {% if prediction %}
61
+ <div class="prediction-box">
62
+ 🌸 The predicted flower species is: <strong>{{ prediction }}</strong>
63
+ </div>
64
+ {% endif %}
65
+
66
+ {% if error %}
67
+ <div class="alert alert-danger">{{ error }}</div>
68
+ {% endif %}
69
  </section>
70
 
71
  <section class="contact">
 
77
  <button class="logout-btn">Logout</button>
78
  </a>
79
  </div>
80
+
81
  <style>
 
82
  body {
83
  background: #f5f7fa;
84
  color: #333;
 
118
  .contact a:hover { background: #5a67ff; color: white; box-shadow: 0 8px 20px rgba(90,103,255,0.6); }
119
  .logout-btn { margin: 40px auto 0; display: block; background: #ff5c5c; color: white; font-weight: 700; border: none; padding: 14px 28px; border-radius: 30px; cursor: pointer; box-shadow: 0 6px 12px rgba(255,92,92,0.4); transition: background-color 0.3s ease; }
120
  .logout-btn:hover { background: #e04545; }
121
+ .prediction-box { margin-top: 20px; padding: 15px; background: #e8f0fe; border-left: 5px solid #5a67ff; border-radius: 8px; font-size: 1.1rem; }
122
+ .alert { margin-top: 15px; padding: 12px; border-radius: 8px; background: #ffe6e6; color: #cc0000; text-align: center; }
123
  </style>
124
+
125
+ {% if scroll_to %}
126
+ <script>
127
+ document.getElementById("{{ scroll_to }}-title")
128
+ .scrollIntoView({ behavior: "smooth" });
129
+ </script>
130
+ {% endif %}
131
  {% endblock %}