SoulMind01 commited on
Commit
38740b8
·
1 Parent(s): 621d35e

Added index and predicted result web page

Browse files
Files changed (2) hide show
  1. templates/index.html +33 -0
  2. templates/result.html +38 -0
templates/index.html ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <title>Image Classification</title>
6
+ <style>
7
+ body {
8
+ font-family: Arial, sans-serif;
9
+ max-width: 800px;
10
+ margin: 0 auto;
11
+ padding: 20px;
12
+ }
13
+
14
+ .upload-form {
15
+ margin: 20px 0;
16
+ padding: 20px;
17
+ border: 1px solid #ccc;
18
+ border-radius: 5px;
19
+ }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <h1>Image Classification</h1>
25
+ <div class="upload-form">
26
+ <form action="/predict" method="post" enctype="multipart/form-data">
27
+ <input type="file" name="file" accept="image/*" required>
28
+ <input type="submit" value="Predict">
29
+ </form>
30
+ </div>
31
+ </body>
32
+
33
+ </html>
templates/result.html ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <title>Prediction Result</title>
6
+ <style>
7
+ body {
8
+ font-family: Arial, sans-serif;
9
+ max-width: 800px;
10
+ margin: 0 auto;
11
+ padding: 20px;
12
+ }
13
+
14
+ .result {
15
+ margin: 20px 0;
16
+ padding: 20px;
17
+ border: 1px solid #ccc;
18
+ border-radius: 5px;
19
+ }
20
+
21
+ .image {
22
+ max-width: 400px;
23
+ margin: 20px 0;
24
+ }
25
+ </style>
26
+ </head>
27
+
28
+ <body>
29
+ <h1>Prediction Result</h1>
30
+ <div class="result">
31
+ <img src="{{ image_path }}" class="image">
32
+ <h2>Predicted Class: {{ prediction }}</h2>
33
+ <p>Confidence: {{ confidence }}</p>
34
+ </div>
35
+ <a href="/">Back to Home</a>
36
+ </body>
37
+
38
+ </html>