prasanth345
commited on
Commit
•
a288430
1
Parent(s):
c21ea63
Upload 2 files
Browse files- templates/index.html +61 -0
- templates/result.html +50 -0
templates/index.html
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Sentiment Analysis</title>
|
5 |
+
<style>
|
6 |
+
body {
|
7 |
+
font-family: Arial, sans-serif;
|
8 |
+
margin: 0;
|
9 |
+
padding: 20px;
|
10 |
+
background-image: url("https://plus.unsplash.com/premium_photo-1683690944962-2627f6d2e0d4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80");
|
11 |
+
background-size: cover; /* Updated background-size values */
|
12 |
+
background-repeat: no-repeat;
|
13 |
+
|
14 |
+
}
|
15 |
+
h1 {
|
16 |
+
margin-bottom: 20px;
|
17 |
+
text-align: center;
|
18 |
+
color: rgb(0, 0, 0);
|
19 |
+
}
|
20 |
+
|
21 |
+
form {
|
22 |
+
display: flex;
|
23 |
+
flex-direction: column;
|
24 |
+
align-items: center;
|
25 |
+
margin-bottom: 20px;
|
26 |
+
}
|
27 |
+
|
28 |
+
textarea {
|
29 |
+
width: 50%;
|
30 |
+
resize: vertical;
|
31 |
+
min-width: 300px;
|
32 |
+
text-align: center;
|
33 |
+
}
|
34 |
+
|
35 |
+
input[type="submit"] {
|
36 |
+
background-color: #4CAF50;
|
37 |
+
color: white;
|
38 |
+
padding: 12px 24px;
|
39 |
+
border: none;
|
40 |
+
border-radius: 4px;
|
41 |
+
cursor: pointer;
|
42 |
+
transition: background-color 0.3s;
|
43 |
+
}
|
44 |
+
|
45 |
+
input[type="submit"]:hover {
|
46 |
+
background-color: #bee0bf;
|
47 |
+
|
48 |
+
|
49 |
+
}
|
50 |
+
</style>
|
51 |
+
|
52 |
+
</style>
|
53 |
+
</head>
|
54 |
+
<body>
|
55 |
+
<h1>Enter Comment</h1>
|
56 |
+
<form action="/predict" method="post">
|
57 |
+
<textarea name="comment" rows="5" cols="50"></textarea><br><br>
|
58 |
+
<input type="submit" value="Submit">
|
59 |
+
</form>
|
60 |
+
</body>
|
61 |
+
</html>
|
templates/result.html
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html>
|
3 |
+
<head>
|
4 |
+
<title>Sentiment Analysis Result</title>
|
5 |
+
<style>
|
6 |
+
|
7 |
+
body {
|
8 |
+
font-family: Arial, sans-serif;
|
9 |
+
margin: 0;
|
10 |
+
padding: 20px;
|
11 |
+
text-align: center; /* Add this line to align the content in the center */
|
12 |
+
background-image: url("https://plus.unsplash.com/premium_photo-1683690944962-2627f6d2e0d4?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=800&q=80"); /* Replace "path/to/your/image.jpg" with the actual path to your image */
|
13 |
+
background-size: 100% auto;
|
14 |
+
|
15 |
+
}
|
16 |
+
|
17 |
+
h1 {
|
18 |
+
margin-bottom: 20px;
|
19 |
+
text-align: center; /* Add this line to align the heading in the center */
|
20 |
+
|
21 |
+
}
|
22 |
+
|
23 |
+
p {
|
24 |
+
margin-bottom: 10px;
|
25 |
+
text-align: center; /* Add this line to align the paragraph in the center */
|
26 |
+
|
27 |
+
}
|
28 |
+
|
29 |
+
strong {
|
30 |
+
font-weight: bold;
|
31 |
+
display: inline-block; /* Add this line to display the <strong> element as an inline-block */
|
32 |
+
text-align: center; /* Add this line to align the <strong> element in the center */
|
33 |
+
margin: 0 auto; /* Add this line to horizontally center the <strong> element */
|
34 |
+
|
35 |
+
}
|
36 |
+
</style>
|
37 |
+
</head>
|
38 |
+
<body>
|
39 |
+
<h1> Sentiment Analysis </h1>
|
40 |
+
<p><strong>Comment:</strong> {{ comment }}</p>
|
41 |
+
<p><strong>Sentiment:</strong> {{ sentiment }}</p>
|
42 |
+
{% if sentiment == 'positive ' %}
|
43 |
+
<img src="https://cliply.co/wp-content/uploads/2021/03/392103580_BLUSHING_EMOJI_400px.gif" alt="Positive GIF">
|
44 |
+
{% elif sentiment == 'negative ' %}
|
45 |
+
<img src="https://cliply.co/wp-content/uploads/2021/03/392103840_SAD_EMOJI_WITH_TEAR_400px.gif" alt="Negative GIF">
|
46 |
+
{% elif sentiment == 'neutral ' %}
|
47 |
+
<img src="https://cliply.co/wp-content/uploads/2021/03/392103390_SAD_EMOJI_400px.gif" alt="Neutral GIF">
|
48 |
+
{% endif %}
|
49 |
+
</body>
|
50 |
+
</html>
|