Update templates/index.html
Browse files- templates/index.html +12 -3
templates/index.html
CHANGED
|
@@ -1,10 +1,19 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
-
<title>Sentiment
|
| 5 |
</head>
|
| 6 |
<body>
|
| 7 |
-
<h1>
|
| 8 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
</body>
|
| 10 |
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html>
|
| 3 |
<head>
|
| 4 |
+
<title>Sentiment Analyzer</title>
|
| 5 |
</head>
|
| 6 |
<body>
|
| 7 |
+
<h1>Sentiment Analysis</h1>
|
| 8 |
+
<form method="POST">
|
| 9 |
+
<textarea name="user_input" rows="4" cols="50" placeholder="Enter text here..."></textarea><br>
|
| 10 |
+
<button type="submit">Analyze</button>
|
| 11 |
+
</form>
|
| 12 |
+
|
| 13 |
+
{% if result %}
|
| 14 |
+
<h2>Result:</h2>
|
| 15 |
+
<p><strong>Label:</strong> {{ result['label'] }}</p>
|
| 16 |
+
<p><strong>Confidence:</strong> {{ result['score'] | round(2) }}</p>
|
| 17 |
+
{% endif %}
|
| 18 |
</body>
|
| 19 |
</html>
|