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

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +66 -18
index.html CHANGED
@@ -2,28 +2,76 @@
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 class="header">
14
+ <div class="header-content">
15
+ <h1 class="title">AI Chat Assistant</h1>
16
+ <p class="subtitle">Powered by Llama 3.2 1B</p>
17
+ </div>
18
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
19
+ Built with anycoder
20
+ </a>
21
+ </header>
22
+
23
+ <div class="chat-container">
24
+ <div id="messages" class="messages-container">
25
+ <div class="welcome-message">
26
+ <div class="welcome-icon">
27
+ <svg width="64" height="64" viewBox="0 0 64 64" fill="none">
28
+ <circle cx="32" cy="32" r="32" fill="url(#gradient)" />
29
+ <path d="M32 20v24M20 32h24" stroke="white" stroke-width="3" stroke-linecap="round" />
30
+ <defs>
31
+ <linearGradient id="gradient" x1="0" y1="0" x2="64" y2="64">
32
+ <stop offset="0%" style="stop-color:#007AFF" />
33
+ <stop offset="100%" style="stop-color:#5856D6" />
34
+ </linearGradient>
35
+ </defs>
36
+ </svg>
37
+ </div>
38
+ <h2>Welcome to AI Chat</h2>
39
+ <p>Start a conversation with your AI assistant. Ask questions, get creative, or just chat!</p>
40
+ </div>
41
+ </div>
42
+
43
+ <div class="input-container">
44
+ <div class="input-wrapper">
45
+ <textarea
46
+ id="userInput"
47
+ placeholder="Message"
48
+ rows="1"
49
+ disabled
50
+ ></textarea>
51
+ <button id="sendBtn" class="send-btn" disabled>
52
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
53
+ <path d="M2 10L18 2L10 18L8 11L2 10Z" fill="currentColor"/>
54
+ </svg>
55
+ </button>
56
+ </div>
57
+ <div id="status" class="status">Initializing...</div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+
62
+ <div id="loadingOverlay" class="loading-overlay">
63
+ <div class="loading-content">
64
+ <div class="loading-spinner"></div>
65
+ <h3>Loading AI Model</h3>
66
+ <p id="loadingText">Preparing your assistant...</p>
67
+ <div class="progress-bar">
68
+ <div id="progressFill" class="progress-fill"></div>
69
+ </div>
70
+ <p id="progressText" class="progress-text">0%</p>
71
+ </div>
72
+ </div>
73
 
74
+ <script type="module" src="index.js"></script>
75
  </body>
76
 
77
  </html>