File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -2506,4 +2506,14 @@ progress::-webkit-progress-value {
2506
2506
2507
2507
.neg ::-webkit-progress-value {
2508
2508
background-color : red;
2509
+ }
2510
+
2511
+ .poscount {
2512
+ color : green;
2513
+ font-family : 'Signika' , sans-serif;
2514
+ }
2515
+
2516
+ .negcount {
2517
+ color : red;
2518
+ font-family : 'Signika' , sans-serif;
2509
2519
}
Original file line number Diff line number Diff line change @@ -186,10 +186,12 @@ <h2>Execution</h2>
186
186
< tr >
187
187
< td class ="senti-label "> Positive Sentiment</ td >
188
188
< td > < progress min =0 max =100 value =100 id ="posbar " class ="pos "> </ progress > </ td >
189
+ < td > < p id ="poscount " class ="poscount "> </ p > </ td >
189
190
</ tr >
190
191
< tr >
191
192
< td class ="senti-label "> Negative Sentiment</ td >
192
193
< td > < progress min =0 max =100 value =100 id ="negbar " class ="neg "> </ progress > </ td >
194
+ < td > < p id ="negcount " class ="negcount "> </ p > </ td >
193
195
</ tr >
194
196
</ table >
195
197
</ div >
@@ -816,8 +818,11 @@ <h4>Kushal Rajput</h4>
816
818
<!-- Vendor JS Files -->
817
819
< script type ="text/javascript ">
818
820
var val = { { prediction_text} } ;
821
+ var unval = 1 - val ;
819
822
document . getElementById ( 'posbar' ) . value = val * 100 ;
820
823
document . getElementById ( 'negbar' ) . value = ( 1 - val ) * 100 ;
824
+ document . getElementById ( 'poscount' ) . innerHTML = val . toFixed ( 5 ) * 100 + " %" ;
825
+ document . getElementById ( 'negcount' ) . innerHTML = unval . toFixed ( 5 ) * 100 + " %" ;
821
826
function dis ( ) {
822
827
document . getElementById ( "sub" ) . value = 'Analysing...' ;
823
828
document . getElementById ( "sub" ) . disabled = true ;
You can’t perform that action at this time.
0 commit comments