Create templates/index.html
Browse files- templates/index.html +23 -0
templates/index.html
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<title>Hugging Face Sentiment App</title>
|
| 6 |
+
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
| 7 |
+
</head>
|
| 8 |
+
<body>
|
| 9 |
+
<div class="container">
|
| 10 |
+
<h1>Sentiment Analysis</h1>
|
| 11 |
+
<form method="POST">
|
| 12 |
+
<textarea name="text" placeholder="Enter text here..."></textarea>
|
| 13 |
+
<button type="submit">Analyze</button>
|
| 14 |
+
</form>
|
| 15 |
+
{% if result %}
|
| 16 |
+
<div class="result">
|
| 17 |
+
<strong>Label:</strong> {{ result.label }}<br>
|
| 18 |
+
<strong>Score:</strong> {{ result.score | round(2) }}
|
| 19 |
+
</div>
|
| 20 |
+
{% endif %}
|
| 21 |
+
</div>
|
| 22 |
+
</body>
|
| 23 |
+
</html>
|