jaison2611 commited on
Commit
2c5e583
·
verified ·
1 Parent(s): b7ee9b4

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +18 -167
index.html CHANGED
@@ -2,177 +2,28 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>WebGPU AI Studio</title>
7
- <script src="https://cdn.jsdelivr.net/npm/@xenova/transformers@2.17.1"></script>
8
  <style>
9
- :root {
10
- --primary: #00ffcc;
11
- --bg: #121212;
12
- --card: #1e1e1e;
13
- --text: #ffffff;
14
- }
15
-
16
- body {
17
- font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
18
- background-color: var(--bg);
19
- color: var(--text);
20
- margin: 0;
21
- display: flex;
22
- justify-content: center;
23
- align-items: center;
24
- min-height: 100vh;
25
- }
26
-
27
- .container {
28
- width: 100%;
29
- max-width: 500px;
30
- background: var(--card);
31
- padding: 40px;
32
- border-radius: 20px;
33
- box-shadow: 0 10px 30px rgba(0,0,0,0.5);
34
- text-align: center;
35
- }
36
-
37
- h1 {
38
- margin-top: 0;
39
- color: var(--primary);
40
- font-size: 1.8rem;
41
- }
42
-
43
- p {
44
- color: #888;
45
- font-size: 0.9rem;
46
- margin-bottom: 30px;
47
- }
48
-
49
- /* Progress Bar Styling */
50
- #progress-container {
51
- margin-bottom: 25px;
52
- text-align: left;
53
- }
54
-
55
- .progress-bg {
56
- width: 100%;
57
- background: #333;
58
- height: 12px;
59
- border-radius: 6px;
60
- overflow: hidden;
61
- }
62
-
63
- #progress-bar {
64
- width: 0%;
65
- background: linear-gradient(90deg, var(--primary), #00aba9);
66
- height: 100%;
67
- transition: width 0.3s ease;
68
- }
69
-
70
- #progress-text {
71
- font-size: 0.75rem;
72
- color: #aaa;
73
- margin-top: 8px;
74
- }
75
-
76
- /* File Upload Styling */
77
- .upload-section {
78
- margin-bottom: 25px;
79
- }
80
-
81
- .custom-file-upload {
82
- display: inline-block;
83
- padding: 12px 20px;
84
- cursor: pointer;
85
- background: #2a2a2a;
86
- border: 1px dashed #555;
87
- border-radius: 10px;
88
- transition: all 0.2s;
89
- }
90
-
91
- .custom-file-upload:hover {
92
- border-color: var(--primary);
93
- background: #333;
94
- }
95
-
96
- input[type="file"] {
97
- display: none;
98
- }
99
-
100
- /* Button Styling */
101
- #process-btn {
102
- background: var(--primary);
103
- color: #121212;
104
- border: none;
105
- padding: 15px 30px;
106
- border-radius: 12px;
107
- font-weight: bold;
108
- font-size: 1rem;
109
- cursor: pointer;
110
- width: 100%;
111
- transition: transform 0.1s, opacity 0.2s;
112
- }
113
-
114
- #process-btn:active {
115
- transform: scale(0.98);
116
- }
117
-
118
- #process-btn:disabled {
119
- opacity: 0.5;
120
- cursor: not-allowed;
121
- }
122
-
123
- /* Output & Image Preview */
124
- #output {
125
- margin-top: 30px;
126
- padding: 15px;
127
- border-radius: 10px;
128
- background: rgba(0, 255, 204, 0.05);
129
- border: 1px solid rgba(0, 255, 204, 0.1);
130
- min-height: 20px;
131
- font-style: italic;
132
- }
133
-
134
- #preview {
135
- max-width: 100%;
136
- margin-top: 25px;
137
- border-radius: 15px;
138
- border: 2px solid #333;
139
- display: none;
140
- }
141
-
142
- .status-ready {
143
- color: var(--primary);
144
- font-weight: bold;
145
- }
146
  </style>
147
  </head>
148
  <body>
149
-
150
- <div class="container">
151
- <h1>WebGPU AI Studio</h1>
152
- <p>Run private AI analysis on your local GPU.</p>
153
-
154
- <div id="progress-container" style="display: none;">
155
- <div class="progress-bg">
156
- <div id="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>
157
- </div>
158
- <div id="progress-text">Initializing AI models...</div>
159
  </div>
160
-
161
- <div class="upload-section">
162
- <label for="upload" class="custom-file-upload">
163
- 📁 Select Image to Analyze
164
- </label>
165
- <input type="file" id="upload" accept="image/*">
166
- </div>
167
-
168
- <button id="process-btn">Analyze Image</button>
169
-
170
- <div id="output">Ready for input.</div>
171
-
172
- <img id="preview" alt="Image Preview">
173
- </div>
174
-
175
- <script type="module" src="progress_callback.js"></script>
176
-
177
  </body>
178
  </html>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
6
+ <title>Tiny AI Chat</title>
 
7
  <style>
8
+ body { font-family: sans-serif; background: #f4f4f9; margin: 0; padding: 10px; display: flex; flex-direction: column; height: 100vh; box-sizing: border-box; }
9
+ #chat-box { flex: 1; overflow-y: auto; background: white; border-radius: 10px; padding: 15px; margin-bottom: 10px; border: 1px solid #ddd; }
10
+ .msg { margin-bottom: 10px; line-height: 1.4; }
11
+ .user { color: #007bff; font-weight: bold; }
12
+ .ai { color: #28a745; font-weight: bold; }
13
+ .controls { display: flex; gap: 5px; height: 50px; }
14
+ input { flex: 1; border-radius: 25px; border: 1px solid #ccc; padding: 0 15px; font-size: 16px; outline: none; }
15
+ button { background: #007bff; color: white; border: none; border-radius: 25px; padding: 0 20px; font-weight: bold; cursor: pointer; }
16
+ button:disabled { background: #ccc; }
17
+ #status { font-size: 12px; color: #666; text-align: center; margin-bottom: 5px; }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  </style>
19
  </head>
20
  <body>
21
+ <div id="status">Tap "Load AI" to begin (~170MB)</div>
22
+ <div id="chat-box"></div>
23
+ <div class="controls">
24
+ <input type="text" id="chat-input" placeholder="Type a message..." disabled>
25
+ <button id="main-btn">Load AI</button>
 
 
 
 
 
26
  </div>
27
+ <script type="module" src="progress_callback.js"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  </body>
29
  </html>