roshcheeku commited on
Commit
0d8359a
·
verified ·
1 Parent(s): 74904ba

Create sentiment.html

Browse files
Files changed (1) hide show
  1. 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>