Update templates/home.html
Browse files- templates/home.html +21 -2
templates/home.html
CHANGED
|
@@ -20,8 +20,27 @@
|
|
| 20 |
</div>
|
| 21 |
</form>
|
| 22 |
{% if user_input %}
|
| 23 |
-
<h2 class="mt-5 text-center">
|
| 24 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
{% endif %}
|
| 26 |
</div>
|
| 27 |
</body>
|
|
|
|
| 20 |
</div>
|
| 21 |
</form>
|
| 22 |
{% if user_input %}
|
| 23 |
+
<h2 class="mt-5 text-center">Sentiment Analysis Results:</h2>
|
| 24 |
+
<h3 class="mt-5 text-center">{{user_input}}</h3>
|
| 25 |
+
|
| 26 |
+
<table class="table table-bordered">
|
| 27 |
+
<thead>
|
| 28 |
+
<tr>
|
| 29 |
+
<th>Label</th>
|
| 30 |
+
<th>Score</th>
|
| 31 |
+
</tr>
|
| 32 |
+
</thead>
|
| 33 |
+
<tbody>
|
| 34 |
+
{% for item in response %}
|
| 35 |
+
<tr>
|
| 36 |
+
<td class="text-capitalize">{{ item.label }}</td>
|
| 37 |
+
<td>{{ item.score | floatformat }}</td>
|
| 38 |
+
</tr>
|
| 39 |
+
{% endfor %}
|
| 40 |
+
</tbody>
|
| 41 |
+
</table>
|
| 42 |
+
|
| 43 |
+
|
| 44 |
{% endif %}
|
| 45 |
</div>
|
| 46 |
</body>
|