akhaliq HF Staff commited on
Commit
0f2b742
·
verified ·
1 Parent(s): 196f698

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +65 -19
index.html CHANGED
@@ -2,28 +2,74 @@
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>
 
2
  <html lang="en">
3
 
4
  <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>Gemma Chat Assistant</title>
8
+ <link rel="stylesheet" href="styles.css">
 
9
  </head>
10
 
11
  <body>
12
+ <div class="container">
13
+ <header>
14
+ <h1>🤖 Gemma Chat Assistant</h1>
15
+ <p class="subtitle">Powered by Gemma 270M - Running locally in your browser</p>
16
+ <p class="attribution">Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder"
17
+ target="_blank">anycoder</a></p>
18
+ </header>
19
+
20
+ <div class="status-bar" id="statusBar">
21
+ <div class="status-content">
22
+ <span id="statusText">Initializing...</span>
23
+ <div class="progress-container" id="progressContainer" style="display: none;">
24
+ <div class="progress-bar" id="progressBar"></div>
25
+ </div>
26
+ </div>
27
+ </div>
28
+
29
+ <div class="chat-container">
30
+ <div class="messages" id="messagesContainer">
31
+ <div class="message assistant">
32
+ <div class="message-content">
33
+ <strong>Assistant:</strong>
34
+ <p>Hello! I'm your AI assistant powered by Gemma. How can I help you today?</p>
35
+ </div>
36
+ </div>
37
+ </div>
38
+
39
+ <div class="input-container">
40
+ <textarea
41
+ id="userInput"
42
+ placeholder="Type your message here... (Press Enter to send, Shift+Enter for new line)"
43
+ rows="3"
44
+ disabled
45
+ ></textarea>
46
+ <button id="sendButton" disabled>
47
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
48
+ <path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z"/>
49
+ </svg>
50
+ Send
51
+ </button>
52
+ <button id="clearButton" class="clear-btn">
53
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
54
+ <path d="M3 6h18M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/>
55
+ </svg>
56
+ Clear
57
+ </button>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="info-panel">
62
+ <h3>💡 Tips:</h3>
63
+ <ul>
64
+ <li>First load may take 1-2 minutes to download the model (~270MB)</li>
65
+ <li>The model runs entirely in your browser - no data is sent to servers</li>
66
+ <li>Try asking questions, requesting creative writing, or coding help</li>
67
+ <li>Press Enter to send, Shift+Enter for a new line</li>
68
+ </ul>
69
+ </div>
70
+ </div>
71
+
72
+ <script type="module" src="app.js"></script>
73
  </body>
74
 
75
  </html>