<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Sentiment Analyzer</title> | |
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}"> | |
</head> | |
<body> | |
<h1>Sentiment Analysis</h1> | |
<form method="POST"> | |
<textarea name="user_input" rows="4" cols="50" placeholder="Enter text here..."></textarea><br> | |
<button type="submit">Analyze</button> | |
</form> | |
{% if result %} | |
<h2>Result:</h2> | |
<p><strong>Label:</strong> {{ result['label'] }}</p> | |
<p><strong>Confidence:</strong> {{ result['score'] | round(2) }}</p> | |
{% endif %} | |
</body> | |
</html> | |