Swathi6 commited on
Commit
9352aa2
·
verified ·
1 Parent(s): d8e9626

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +12 -3
templates/index.html CHANGED
@@ -1,10 +1,19 @@
1
  <!DOCTYPE html>
2
  <html>
3
  <head>
4
- <title>Sentiment Analysis</title>
5
  </head>
6
  <body>
7
- <h1>Welcome to the Hugging Face Sentiment Analyzer</h1>
8
- <p>Please launch the Gradio app from <code>app.py</code>.</p>
 
 
 
 
 
 
 
 
 
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>