Nrup Parikh commited on
Commit
7713563
·
1 Parent(s): 1aea387

added loader

Browse files
Files changed (1) hide show
  1. app.py +29 -2
app.py CHANGED
@@ -183,12 +183,32 @@ def index():
183
  body { padding: 30px; }
184
  th, td { text-align: center; }
185
  .result-card { margin-top: 40px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  </style>
187
  </head>
188
  <body>
 
 
 
 
 
189
  <div class="container">
190
  <h3 class="text-center mb-4">Stock Prediction Dashboard</h3>
191
- <form method="POST" class="text-center mb-4">
192
  <div class="row justify-content-center">
193
  <div class="col-md-4">
194
  <select name="symbol" class="form-select">
@@ -223,9 +243,16 @@ def index():
223
  <div class="mt-4">
224
  <h5>Last 30 Days Data</h5>
225
  {{ table_html | safe }}
226
- </div>
227
  {% endif %}
228
  </div>
 
 
 
 
 
 
 
229
  </body>
230
  </html>
231
  """,
 
183
  body { padding: 30px; }
184
  th, td { text-align: center; }
185
  .result-card { margin-top: 40px; }
186
+
187
+ /* Loading Overlay Styles */
188
+ load-overlay {
189
+ dipslay: none;
190
+ position: fixed;
191
+ top: 0;
192
+ left: 0;
193
+ width: 100%;
194
+ height: 100%;
195
+ background: rgba(255, 255, 255, 0.8);
196
+ z-index: 9999;
197
+ justify-content: center;
198
+ flex-direction: column;
199
+ }
200
+
201
  </style>
202
  </head>
203
  <body>
204
+
205
+ <div id="loader-overlay>
206
+ <div class="spinner-border text-primary" role="status" style="width: 4rem; height: 4rem;"> </div>
207
+ <p class="mt-3 fw-bold text-primary">Predicting...</p>
208
+ </div>
209
  <div class="container">
210
  <h3 class="text-center mb-4">Stock Prediction Dashboard</h3>
211
+ <form method="POST" class="text-center mb-4" ="showLoader()">
212
  <div class="row justify-content-center">
213
  <div class="col-md-4">
214
  <select name="symbol" class="form-select">
 
243
  <div class="mt-4">
244
  <h5>Last 30 Days Data</h5>
245
  {{ table_html | safe }}
246
+ </div>
247
  {% endif %}
248
  </div>
249
+
250
+ /* Loading Overlay Script */
251
+ <script>
252
+ function showLoader(){
253
+ document.getElementById('loader-overlay').style.display = 'flex';
254
+ }
255
+ </script>
256
  </body>
257
  </html>
258
  """,