bhavibhatt commited on
Commit
e0ad4c6
·
verified ·
1 Parent(s): 027dbae

Create templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +36 -0
templates/index.html ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Waste Classifier</title>
6
+ <style>
7
+ body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; text-align: center; margin-top: 50px; background-color: #f4f4f9; color: #333; }
8
+ .container { background-color: #ffffff; padding: 30px 40px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); display: inline-block; }
9
+ h1 { font-size: 2em; color: #2c3e50; }
10
+ .result { margin-top: 30px; font-size: 1.3em; color: #0056b3; }
11
+ img { max-width: 300px; margin-top: 20px; border: 3px solid #e7e7e7; border-radius: 8px; }
12
+ button { background-color: #007bff; color: white; padding: 12px 20px; border: none; border-radius: 5px; cursor: pointer; font-size: 1em; transition: background-color 0.2s; }
13
+ button:hover { background-color: #0056b3; }
14
+ input[type="file"] { margin-right: 10px; }
15
+ </style>
16
+ </head>
17
+ <body>
18
+ <div class="container">
19
+ <h1>Automated Waste Classifier</h1>
20
+ <p>Upload an image of a waste item to classify it.</p>
21
+ <form action="/predict" method="post" enctype="multipart/form-data">
22
+ <input type="file" name="file" accept="image/*" required>
23
+ <button type="submit">Classify</button>
24
+ </form>
25
+
26
+ {% if prediction %}
27
+ <div class="result">
28
+ <h2>{{ prediction }}</h2>
29
+ <h3>{{ confidence }}</h3>
30
+ <img src="{{ uploaded_image }}" alt="Uploaded Image">
31
+ </div>
32
+ {% endif %}
33
+ </div>
34
+ </body>
35
+ </html>
36
+