dmar1313 commited on
Commit
16c5571
1 Parent(s): 7ec2237

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +66 -17
index.html CHANGED
@@ -1,19 +1,68 @@
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>AI ChatBot</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ background-color: #f4f4f4;
11
+ }
12
+ #chat-container {
13
+ width: 80%;
14
+ margin: auto;
15
+ margin-top: 50px;
16
+ padding: 20px;
17
+ border: 1px solid #ccc;
18
+ background-color: #fff;
19
+ position: relative;
20
+ overflow: auto;
21
+ height: 400px;
22
+ }
23
+ .user, .bot {
24
+ padding: 10px;
25
+ margin: 10px;
26
+ border-radius: 5px;
27
+ }
28
+ .user {
29
+ background-color: #e0e0e0;
30
+ text-align: right;
31
+ }
32
+ .bot {
33
+ background-color: #d1f5d3;
34
+ }
35
+ #input-container {
36
+ margin-top: 20px;
37
+ }
38
+ </style>
39
+ </head>
40
+ <body>
41
+ <div id="chat-container"></div>
42
+ <div id="input-container">
43
+ <input type="text" id="user-input" style="width:80%">
44
+ <button onclick="sendMessage()">Send</button>
45
+ </div>
46
+ <script>
47
+ function appendMessage(who, text) {
48
+ const div = document.createElement('div');
49
+ div.className = who;
50
+ div.textContent = text;
51
+ document.getElementById('chat-container').appendChild(div);
52
+ }
53
+
54
+ function sendMessage() {
55
+ const input = document.getElementById('user-input');
56
+ const text = input.value;
57
+ input.value = '';
58
+
59
+ // Append user message to chat
60
+ appendMessage('user', text);
61
+
62
+ // TODO: Call your AI model to get a response and append to chat
63
+ const response = 'AI response goes here'; // Replace with actual response
64
+ appendMessage('bot', response);
65
+ }
66
+ </script>
67
+ </body>
68
  </html>