Swathi6 commited on
Commit
9c1519d
·
verified ·
1 Parent(s): 8cdd587

Create templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +25 -0
templates/index.html ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Text Classification with Hugging Face</title>
7
+ <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
8
+ </head>
9
+ <body>
10
+ <div class="container">
11
+ <h1>Hugging Face Text Classification</h1>
12
+
13
+ <form action="/predict" method="POST">
14
+ <textarea name="text" rows="4" cols="50" placeholder="Enter your text here...">{{ text }}</textarea>
15
+ <br>
16
+ <input type="submit" value="Classify">
17
+ </form>
18
+
19
+ {% if prediction %}
20
+ <h2>Prediction:</h2>
21
+ <p>{{ prediction[0]['label'] }} (confidence: {{ prediction[0]['score'] }})</p>
22
+ {% endif %}
23
+ </div>
24
+ </body>
25
+ </html>