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

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +70 -18
index.html CHANGED
@@ -2,28 +2,80 @@
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>AI Chat Assistant</title>
8
+ <link rel="stylesheet" href="style.css">
 
9
  </head>
10
 
11
  <body>
12
+ <div class="container">
13
+ <header>
14
+ <div class="header-content">
15
+ <div class="logo">
16
+ <svg width="32" height="32" viewBox="0 0 32 32" fill="none">
17
+ <circle cx="16" cy="16" r="14" stroke="currentColor" stroke-width="2" />
18
+ <path d="M12 16L15 19L20 13" stroke="currentColor" stroke-width="2" stroke-linecap="round"
19
+ stroke-linejoin="round" />
20
+ </svg>
21
+ <h1>AI Assistant</h1>
22
+ </div>
23
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
24
+ Built with anycoder
25
+ </a>
26
+ </div>
27
+ </header>
28
+
29
+ <div class="chat-container">
30
+ <div id="loading-screen" class="loading-screen">
31
+ <div class="loading-content">
32
+ <div class="spinner"></div>
33
+ <h2>Loading AI Model</h2>
34
+ <p id="loading-status">Initializing...</p>
35
+ <div class="progress-bar">
36
+ <div id="progress-fill" class="progress-fill"></div>
37
+ </div>
38
+ <p class="loading-info">This may take a moment on first load</p>
39
+ </div>
40
+ </div>
41
+
42
+ <div id="chat-area" class="chat-area" style="display: none;">
43
+ <div id="messages" class="messages">
44
+ <div class="message assistant-message welcome-message">
45
+ <div class="message-avatar assistant-avatar">
46
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
47
+ <circle cx="10" cy="10" r="8" fill="currentColor" />
48
+ </svg>
49
+ </div>
50
+ <div class="message-content">
51
+ <div class="message-header">AI Assistant</div>
52
+ <div class="message-text">Hello! I'm your AI assistant powered by Gemma. How can I help you today?</div>
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="input-area">
58
+ <div class="input-container">
59
+ <textarea
60
+ id="user-input"
61
+ placeholder="Message AI Assistant..."
62
+ rows="1"
63
+ ></textarea>
64
+ <button id="send-button" class="send-button" disabled>
65
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
66
+ <path d="M18 10L2 2L5 10L2 18L18 10Z" fill="currentColor"/>
67
+ </svg>
68
+ </button>
69
+ </div>
70
+ <div class="input-footer">
71
+ <span class="model-info">Gemma 270M • Press Enter to send</span>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
 
78
+ <script type="module" src="index.js"></script>
79
  </body>
80
 
81
  </html>