Spaces:
Sleeping
Sleeping
Create sentiment.html
Browse files- templates/sentiment.html +25 -0
templates/sentiment.html
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Sentiment Analysis</title>
|
| 6 |
+
</head>
|
| 7 |
+
<body>
|
| 8 |
+
<h1>Sentiment Analysis</h1>
|
| 9 |
+
<form method="post">
|
| 10 |
+
<textarea name="text" rows="5" cols="50" placeholder="Enter text here...">{{ text or '' }}</textarea><br><br>
|
| 11 |
+
<button type="submit">Analyze</button>
|
| 12 |
+
</form>
|
| 13 |
+
{% if sentiment_result %}
|
| 14 |
+
<h2>Results</h2>
|
| 15 |
+
<p>Label: <strong>{{ sentiment_label }}</strong></p>
|
| 16 |
+
<ul>
|
| 17 |
+
<li>Positive: {{ sentiment_result.positive }}</li>
|
| 18 |
+
<li>Negative: {{ sentiment_result.negative }}</li>
|
| 19 |
+
<li>Neutral: {{ sentiment_result.neutral }}</li>
|
| 20 |
+
<li>Compound: {{ sentiment_result.compound }}</li>
|
| 21 |
+
</ul>
|
| 22 |
+
{% endif %}
|
| 23 |
+
<a href="/">Back</a>
|
| 24 |
+
</body>
|
| 25 |
+
</html>
|