File size: 3,401 Bytes
dfe58cd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<!DOCTYPE html>
<html>

<head>

    <script src="{{ url_for('static', filename='js/js.js')}}"></script>
    <link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='images/logo.png')}}">
    <meta charset="utf-8 " />
    <title>Classifiers</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/css.css')}}">
    <link href="https://fonts.googleapis.com " rel="preconnect " />
    <link href="https://fonts.gstatic.com " rel="preconnect " crossorigin="anonymous " />

</head>

<body style="background-color: transparent; padding:0; margin:0;">
    
    <div class="container1">
        <div class="text-generator">
            <h1>Text Classifier</h1>
            <div class="input-section">
                <form id="classification-form" method="POST" action="/classification">
                    <label for="user-input">Enter Text:</label>
                    <input type="text" name="sentence" class="glass-input" id="user-input" placeholder="Type your text here" required>
                    <br><button style="margin-top: 20px;" class="glass-button" type="submit">Classify Text</button>
                </form>
            </div>
            <p style="font-size: 14px; ">Typed Text: <b>{{sentence}}</b></p>
            <br><br><br><br>
        </div>
    


        <div class="text-generated " id="generated-text ">
            
            <div class="message-container ">
                <img class="profile-image " src="{{ url_for('static', filename='images/Hero.png')}}" alt="User Profile Image ">
                <div class="message-content ">
                    <p class="message-name ">LSTM</p>
                    <p class="message-text ">Sentiment: {{LSTM_label}}</p>
                    <p class="message-text ">Probability: {{LSTM_pred}}</p>
                </div>
            </div>

            <div class="message-container ">
                <img class="profile-image " src="{{ url_for('static', filename='images/Hero.png')}}" alt="Friend Profile Image ">
                <div class="message-content ">
                    <p class="message-name ">GRU</p>
                    <p class="message-text ">Sentiment: {{biLSTM_label}}</p>
                    <p class="message-text ">Probability: {{GRU_pred}}</p>
                </div>
            </div>

            <div class="message-container ">
                <img class="profile-image " src="{{ url_for('static', filename='images/Hero.png')}}" alt="Friend Profile Image ">
                <div class="message-content ">
                    <p class="message-name ">BiLSTM</p>
                    <p class="message-text ">Sentiment: {{biLSTM_label}}</p>
                    <p class="message-text ">Probability: {{biLSTM_pred}}</p>
                </div>
            </div>
            <br><br>
        </div>
    </div>

    <div class="loader" id="loader"></div>

    <script src="{{ url_for('static', filename='js/js.js')}}"></script>
    <script>
        // Add event listener to the submit button
        document.getElementById("classification-form").addEventListener("submit", function() {
            // Show the loader
            document.getElementById("loader").style.display = "block";

            // Apply opacity to the background elements
            document.querySelector(".container1").classList.add("blur-background");
        });
    </script>
    
</body>

</html>