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

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +65 -18
index.html CHANGED
@@ -2,28 +2,75 @@
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
+ <link href="https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;600;700&display=swap"
10
+ rel="stylesheet">
11
  </head>
12
 
13
  <body>
14
+ <div class="container">
15
+ <!-- Header -->
16
+ <header class="header">
17
+ <div class="header-content">
18
+ <h1 class="title">
19
+ <span class="gradient-text">AI Chat</span>
20
+ </h1>
21
+ <p class="subtitle">Powered by Gemma 3 270M</p>
22
+ </div>
23
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
24
+ Built with anycoder
25
+ </a>
26
+ </header>
27
+
28
+ <!-- Model Status -->
29
+ <div id="modelStatus" class="model-status">
30
+ <div class="status-content">
31
+ <div class="loader"></div>
32
+ <span id="statusText">Initializing model...</span>
33
+ </div>
34
+ <div id="progressBar" class="progress-bar">
35
+ <div id="progressFill" class="progress-fill"></div>
36
+ </div>
37
+ </div>
38
+
39
+ <!-- Chat Container -->
40
+ <div class="chat-container">
41
+ <div id="chatMessages" class="chat-messages">
42
+ <div class="welcome-message">
43
+ <div class="welcome-icon">💬</div>
44
+ <h2>Welcome to AI Chat</h2>
45
+ <p>Start a conversation by typing a message below. I'm here to help!</p>
46
+ </div>
47
+ </div>
48
+
49
+ <!-- Input Area -->
50
+ <div class="input-container">
51
+ <div class="input-wrapper">
52
+ <textarea
53
+ id="userInput"
54
+ class="user-input"
55
+ placeholder="Type your message..."
56
+ rows="1"
57
+ disabled
58
+ ></textarea>
59
+ <button id="sendButton" class="send-button" disabled>
60
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
61
+ <path d="M22 2L11 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
62
+ <path d="M22 2L15 22L11 13L2 9L22 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
63
+ </svg>
64
+ </button>
65
+ </div>
66
+ <div class="input-hint">
67
+ Press Enter to send • Shift+Enter for new line
68
+ </div>
69
+ </div>
70
+ </div>
71
+ </div>
72
 
73
+ <script type="module" src="index.js"></script>
74
  </body>
75
 
76
  </html>