File size: 2,098 Bytes
62139b4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Hot Dog Classifier</title>
    <link rel="stylesheet" href="/static/style.css">
</head>
<body>
    <div class="container">
        <h1>Hot Dog Classifier</h1>
        
        <div class="upload-section">
            <div class="upload-area" id="uploadArea">
                <div class="upload-content">
                    <div class="upload-icon">πŸ“</div>
                    <p>Drag and drop an image here</p>
                    <p>or</p>
                    <input type="file" id="fileInput" accept="image/*" style="display: none;">
                    <button class="browse-btn" onclick="document.getElementById('fileInput').click()">Browse Files</button>
                </div>
            </div>
        </div>

        <div class="image-section" id="imageSection" style="display: none;">
            <h3>Uploaded Image:</h3>
            <div class="image-container">
                <img id="uploadedImage" alt="Uploaded image">
            </div>
        </div>

        <div class="button-section">
            <button class="predict-btn" id="predictBtn" onclick="predictImage()">Predict</button>
        </div>

        <div class="results-section" id="resultsSection" style="display: none;">
            <h3>Prediction Results:</h3>
            <div class="results-container">
                <div class="result-item">
                    <span class="label">Hot Dog:</span>
                    <span class="probability" id="hotDogProb">-</span>
                </div>
                <div class="result-item">
                    <span class="label">Not Hot Dog:</span>
                    <span class="probability" id="notHotDogProb">-</span>
                </div>
            </div>
        </div>

        <div class="loading" id="loading" style="display: none;">
            <div class="spinner"></div>
            <p>Predicting...</p>
        </div>
    </div>

    <script src="/static/index.js"></script>
</body>
</html>