akhaliq HF Staff commited on
Commit
a55f7d9
·
verified ·
1 Parent(s): 3215ade

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +67 -21
index.html CHANGED
@@ -1,29 +1,75 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
-
4
  <head>
5
- <meta charset="UTF-8" />
6
- <link rel="stylesheet" href="style.css" />
7
-
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <title>Transformers.js - Object Detection</title>
10
  </head>
11
-
12
  <body>
13
- <h1>Object Detection w/ 🤗 Transformers.js</h1>
14
- <label id="container" for="upload">
15
- <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
16
- <path fill="#000"
17
- d="M3.5 24.3a3 3 0 0 1-1.9-.8c-.5-.5-.8-1.2-.8-1.9V2.9c0-.7.3-1.3.8-1.9.6-.5 1.2-.7 2-.7h18.6c.7 0 1.3.2 1.9.7.5.6.7 1.2.7 2v18.6c0 .7-.2 1.4-.7 1.9a3 3 0 0 1-2 .8H3.6Zm0-2.7h18.7V2.9H3.5v18.7Zm2.7-2.7h13.3c.3 0 .5 0 .6-.3v-.7l-3.7-5a.6.6 0 0 0-.6-.2c-.2 0-.4 0-.5.3l-3.5 4.6-2.4-3.3a.6.6 0 0 0-.6-.3c-.2 0-.4.1-.5.3l-2.7 3.6c-.1.2-.2.4 0 .7.1.2.3.3.6.3Z">
18
- </path>
19
- </svg>
20
- Click to upload image
21
- <label id="example">(or try example)</label>
22
- </label>
23
- <label id="status">Loading model...</label>
24
- <input id="upload" type="file" accept="image/*" />
 
 
25
 
26
- <script src="index.js" type="module"></script>
27
- </body>
 
 
 
 
 
 
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  </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 - MobileLLM</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
9
  </head>
 
10
  <body>
11
+ <div class="container">
12
+ <header>
13
+ <h1>AI Assistant</h1>
14
+ <div class="model-info">
15
+ <span class="model-badge">MobileLLM-140M</span>
16
+ <div class="device-toggle">
17
+ <label class="switch">
18
+ <input type="checkbox" id="deviceToggle">
19
+ <span class="slider"></span>
20
+ </label>
21
+ <span id="deviceLabel">CPU</span>
22
+ </div>
23
+ </div>
24
+ </header>
25
 
26
+ <div class="chat-container">
27
+ <div id="chatMessages" class="chat-messages">
28
+ <div class="welcome-message">
29
+ <div class="welcome-icon">🤖</div>
30
+ <h2>Welcome to AI Assistant</h2>
31
+ <p>I'm powered by MobileLLM, a lightweight language model. Ask me anything!</p>
32
+ </div>
33
+ </div>
34
 
35
+ <div id="loadingIndicator" class="loading-indicator hidden">
36
+ <div class="typing-dots">
37
+ <span></span>
38
+ <span></span>
39
+ <span></span>
40
+ </div>
41
+ </div>
42
+ </div>
43
+
44
+ <div class="input-container">
45
+ <div class="input-wrapper">
46
+ <textarea
47
+ id="userInput"
48
+ placeholder="Type your message here..."
49
+ rows="1"
50
+ maxlength="1000"
51
+ ></textarea>
52
+ <button id="sendButton" class="send-button" disabled>
53
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
54
+ <path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/>
55
+ </svg>
56
+ </button>
57
+ </div>
58
+ <div class="input-info">
59
+ <span id="charCount">0 / 1000</span>
60
+ <button id="clearButton" class="clear-button">Clear Chat</button>
61
+ </div>
62
+ </div>
63
+
64
+ <div id="initLoader" class="init-loader">
65
+ <div class="loader-content">
66
+ <div class="spinner"></div>
67
+ <p>Loading AI Model...</p>
68
+ <p class="loader-subtext">This may take a moment on first load</p>
69
+ </div>
70
+ </div>
71
+ </div>
72
+
73
+ <script type="module" src="index.js"></script>
74
+ </body>
75
  </html>