maheshmmm22 commited on
Commit
dddff45
·
verified ·
1 Parent(s): 3392a27

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +68 -18
index.html CHANGED
@@ -1,19 +1,69 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
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>IPC Prediction App</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ background-color: #f4f4f4;
11
+ margin: 0;
12
+ padding: 20px;
13
+ }
14
+ .container {
15
+ max-width: 600px;
16
+ margin: auto;
17
+ background: white;
18
+ padding: 20px;
19
+ border-radius: 5px;
20
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
21
+ }
22
+ input {
23
+ width: 100%;
24
+ padding: 10px;
25
+ margin: 10px 0;
26
+ border: 1px solid #ccc;
27
+ border-radius: 5px;
28
+ }
29
+ button {
30
+ padding: 10px 15px;
31
+ background-color: #4CAF50;
32
+ color: white;
33
+ border: none;
34
+ border-radius: 5px;
35
+ cursor: pointer;
36
+ }
37
+ .response {
38
+ margin-top: 20px;
39
+ }
40
+ </style>
41
+ </head>
42
+ <body>
43
+ <div class="container">
44
+ <h1>IPC Prediction App</h1>
45
+ <input type="text" id="input-text" placeholder="Enter legal text here">
46
+ <button onclick="predictIPC()">Predict</button>
47
+ <div class="response" id="response"></div>
48
+ </div>
49
+
50
+ <script>
51
+ async function predictIPC() {
52
+ const inputText = document.getElementById('input-text').value;
53
+ const responseDiv = document.getElementById('response');
54
+
55
+ // Call the Hugging Face API (replace 'your-space-url' with your actual Space URL)
56
+ const response = await fetch('https://your-space-url/predict', {
57
+ method: 'POST',
58
+ headers: {
59
+ 'Content-Type': 'application/json'
60
+ },
61
+ body: JSON.stringify({ text: inputText })
62
+ });
63
+
64
+ const result = await response.json();
65
+ responseDiv.innerHTML = `<strong>Predicted Section:</strong> ${result.predicted_section}<br><strong>Description:</strong> ${result.description}`;
66
+ }
67
+ </script>
68
+ </body>
69
  </html>