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

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +86 -18
index.html CHANGED
@@ -2,28 +2,96 @@
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>Apple Style Chatbot - Gemma AI</title>
8
+ <link rel="stylesheet" href="style.css">
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
12
  </head>
13
 
14
  <body>
15
+ <div class="app-container">
16
+ <!-- Header -->
17
+ <header class="header">
18
+ <div class="header-content">
19
+ <div class="header-left">
20
+ <div class="ai-icon">
21
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
22
+ stroke-linecap="round" stroke-linejoin="round">
23
+ <path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" />
24
+ <path d="M12 8v4" />
25
+ <circle cx="12" cy="16" r="1" />
26
+ </svg>
27
+ </div>
28
+ <div class="header-text">
29
+ <h1>Gemma AI Assistant</h1>
30
+ <p id="status" class="status-text">Loading model...</p>
31
+ </div>
32
+ </div>
33
+ <div class="header-right">
34
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
35
+ Built with anycoder
36
+ </a>
37
+ </div>
38
+ </div>
39
+ </header>
40
+
41
+ <!-- Chat Container -->
42
+ <main class="chat-container">
43
+ <div id="chatMessages" class="chat-messages">
44
+ <div class="welcome-message">
45
+ <div class="ai-avatar">
46
+ <svg width="32" height="32" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
47
+ <path d="M12 2L2 7v10c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V7l-10-5z" />
48
+ <path d="M12 8v4" />
49
+ <circle cx="12" cy="16" r="1" />
50
+ </svg>
51
+ </div>
52
+ <div class="message-content">
53
+ <p>Hello! I'm Gemma, your AI assistant. How can I help you today?</p>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <!-- Loading Indicator -->
59
+ <div id="loadingIndicator" class="loading-indicator hidden">
60
+ <div class="loading-spinner"></div>
61
+ <span>Downloading model...</span>
62
+ <div class="progress-bar">
63
+ <div id="progressFill" class="progress-fill"></div>
64
+ </div>
65
+ <span id="progressText" class="progress-text">0%</span>
66
+ </div>
67
+ </main>
68
+
69
+ <!-- Input Area -->
70
+ <footer class="input-area">
71
+ <div class="input-container">
72
+ <textarea
73
+ id="messageInput"
74
+ class="message-input"
75
+ placeholder="Type your message..."
76
+ rows="1"
77
+ disabled
78
+ ></textarea>
79
+ <button id="sendButton" class="send-button" disabled>
80
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
81
+ <line x1="22" y1="2" x2="11" y2="13"></line>
82
+ <polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
83
+ </svg>
84
+ </button>
85
+ </div>
86
+ <div class="input-footer">
87
+ <small id="charCount">0 / 1000</small>
88
+ <small>Powered by Gemma 3-270M</small>
89
+ </div>
90
+ </footer>
91
+ </div>
92
 
93
+ <script src="https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/dist/transformers.min.js"></script>
94
+ <script src="index.js"></script>
95
  </body>
96
 
97
  </html>