Bikas0 commited on
Commit
cbd2d9b
1 Parent(s): 82da92f
Files changed (1) hide show
  1. templates/index.html +31 -33
templates/index.html CHANGED
@@ -4,32 +4,32 @@
4
  <title>BERT Predictions</title>
5
  <style>
6
  body {
7
- background-color: #f0f0f0; /* Light grey background */
8
  font-family: Arial, sans-serif;
9
- margin: 0; /* Remove default margin */
10
  display: flex;
11
  flex-direction: column;
12
- min-height: 100vh; /* Ensure the body takes up at least the full viewport height */
13
- position: relative; /* Ensure relative positioning for absolute elements */
14
  }
15
  h2 {
16
  color: #333;
17
  }
18
  .content-wrapper {
19
- flex: 1; /* Allow content to expand within the flex container */
20
  display: flex;
21
  flex-direction: column;
22
  align-items: center;
23
- justify-content: center; /* Center content vertically and horizontally */
24
  }
25
  .input-container {
26
  max-width: 600px;
27
- width: 100%; /* Take up full width within the flex container */
28
  background-color: #fff;
29
  padding: 20px;
30
  border-radius: 8px;
31
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
32
- text-align: left; /* Adjust text alignment as needed */
33
  }
34
  textarea {
35
  width: 100%;
@@ -40,27 +40,27 @@
40
  input[type="submit"] {
41
  padding: 10px 20px;
42
  font-size: 16px;
43
- background-color: #4CAF50; /* Green submit button */
44
  color: white;
45
  border: none;
46
  cursor: pointer;
47
- display: block; /* Ensure block display for centering */
48
- margin: 0 auto; /* Center align button */
49
- transition: background-color 0.3s ease; /* Smooth transition for hover effect */
50
  }
51
  input[type="submit"]:hover {
52
- background-color: #d62728; /* Red on hover */
53
  }
54
  .predictions {
55
- text-align: center; /* Center align predictions */
56
  margin-top: 20px;
57
  }
58
  .prediction-item {
59
  margin-bottom: 10px;
60
  padding-left: 20px;
61
  font-size: 18px;
62
- display: inline-block; /* Ensure items stay inline */
63
- text-align: left; /* Align text left within each item */
64
  }
65
  .icon {
66
  font-size: 20px;
@@ -68,42 +68,40 @@
68
  vertical-align: middle;
69
  }
70
  .category-price {
71
- color: #1f77b4; /* Blue */
72
  }
73
  .category-packaging {
74
- color: #ff7f0e; /* Orange */
75
  }
76
  .category-product {
77
- color: #2ca02c; /* Green */
78
  }
79
  .category-rider {
80
- color: #d62728; /* Red */
81
  }
82
  .category-delivery {
83
- color: #9467bd; /* Purple */
84
  }
85
  .category-shelf {
86
- color: #8c564b; /* Brown */
87
  }
88
  .category-service {
89
- color: #e377c2; /* Pink */
90
  }
91
  .category-seller {
92
- color: #7f7f7f; /* Grey */
93
  }
94
- /* Logo style */
95
  .logo {
96
  position: absolute;
97
  top: 20px;
98
  right: 20px;
99
- width: 150px; /* Increased width of the logo */
100
- height: 80px; /* Increased height of the logo */
101
  }
102
- /* Footer style */
103
  footer {
104
  width: 100%;
105
- background-color: #ccc; /* Light grey background */
106
- padding: 10px 0; /* Padding for content within footer */
107
  text-align: center;
108
  color: #666;
109
  position: relative;
@@ -118,11 +116,10 @@
118
  }
119
  return true;
120
  }
121
-
122
  function clearPredictions() {
123
  var predictionsDiv = document.querySelector('.predictions');
124
  if (predictionsDiv) {
125
- predictionsDiv.innerHTML = ''; // Clear previous predictions
126
  }
127
  }
128
  </script>
@@ -133,7 +130,7 @@
133
  <div class="input-container">
134
  <h2>Enter Text to Predict Multi-Label Classification</h2>
135
  <form name="predictForm" method="post" onsubmit="clearPredictions(); return validateForm()">
136
- <textarea name="text" rows="4" cols="50"></textarea><br><br>
137
  <input type="submit" value="Predict">
138
  </form>
139
  </div>
@@ -155,3 +152,4 @@
155
  </footer>
156
  </body>
157
  </html>
 
 
4
  <title>BERT Predictions</title>
5
  <style>
6
  body {
7
+ background-color: #f0f0f0;
8
  font-family: Arial, sans-serif;
9
+ margin: 0;
10
  display: flex;
11
  flex-direction: column;
12
+ min-height: 100vh;
13
+ position: relative;
14
  }
15
  h2 {
16
  color: #333;
17
  }
18
  .content-wrapper {
19
+ flex: 1;
20
  display: flex;
21
  flex-direction: column;
22
  align-items: center;
23
+ justify-content: center;
24
  }
25
  .input-container {
26
  max-width: 600px;
27
+ width: 100%;
28
  background-color: #fff;
29
  padding: 20px;
30
  border-radius: 8px;
31
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
32
+ text-align: left;
33
  }
34
  textarea {
35
  width: 100%;
 
40
  input[type="submit"] {
41
  padding: 10px 20px;
42
  font-size: 16px;
43
+ background-color: #4CAF50;
44
  color: white;
45
  border: none;
46
  cursor: pointer;
47
+ display: block;
48
+ margin: 0 auto;
49
+ transition: background-color 0.3s ease;
50
  }
51
  input[type="submit"]:hover {
52
+ background-color: #d62728;
53
  }
54
  .predictions {
55
+ text-align: center;
56
  margin-top: 20px;
57
  }
58
  .prediction-item {
59
  margin-bottom: 10px;
60
  padding-left: 20px;
61
  font-size: 18px;
62
+ display: inline-block;
63
+ text-align: left;
64
  }
65
  .icon {
66
  font-size: 20px;
 
68
  vertical-align: middle;
69
  }
70
  .category-price {
71
+ color: #1f77b4;
72
  }
73
  .category-packaging {
74
+ color: #ff7f0e;
75
  }
76
  .category-product {
77
+ color: #2ca02c;
78
  }
79
  .category-rider {
80
+ color: #d62728;
81
  }
82
  .category-delivery {
83
+ color: #9467bd;
84
  }
85
  .category-shelf {
86
+ color: #8c564b;
87
  }
88
  .category-service {
89
+ color: #e377c2;
90
  }
91
  .category-seller {
92
+ color: #7f7f7f;
93
  }
 
94
  .logo {
95
  position: absolute;
96
  top: 20px;
97
  right: 20px;
98
+ width: 150px;
99
+ height: 80px;
100
  }
 
101
  footer {
102
  width: 100%;
103
+ background-color: #ccc;
104
+ padding: 10px 0;
105
  text-align: center;
106
  color: #666;
107
  position: relative;
 
116
  }
117
  return true;
118
  }
 
119
  function clearPredictions() {
120
  var predictionsDiv = document.querySelector('.predictions');
121
  if (predictionsDiv) {
122
+ predictionsDiv.innerHTML = '';
123
  }
124
  }
125
  </script>
 
130
  <div class="input-container">
131
  <h2>Enter Text to Predict Multi-Label Classification</h2>
132
  <form name="predictForm" method="post" onsubmit="clearPredictions(); return validateForm()">
133
+ <textarea name="text" rows="4" cols="50">{{ text }}</textarea><br><br>
134
  <input type="submit" value="Predict">
135
  </form>
136
  </div>
 
152
  </footer>
153
  </body>
154
  </html>
155
+