tylermullen commited on
Commit
868e921
·
verified ·
1 Parent(s): db35e69

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +87 -17
index.html CHANGED
@@ -1,19 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!-- Copyright 2025 The MediaPipe Authors.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ ------------------------------------------------------------------------ -->
16
+
17
  <!doctype html>
18
+ <html lang="en">
19
+ <head>
20
+ <meta charset="UTF-8" />
21
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
22
+ <title>Gemma 3n Multimodal Demo</title>
23
+ <link
24
+ rel="stylesheet"
25
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css"
26
+ integrity="sha512-SnH5WK+bZxgPHs44uWIX+LLJAJ9/2PkPKZ5QiAj6Ta86w+fsb2TkcmfRyVX3pBnMFcV7oQPJkl9QevSCWr3W6A=="
27
+ crossorigin="anonymous"
28
+ referrerpolicy="no-referrer"
29
+ />
30
+ <link rel="stylesheet" href="style.css" />
31
+ <script src="https://unpkg.com/[email protected]/dist/es-module-shims.js"></script>
32
+ <script type="importmap">
33
+ {
34
+ "imports": {
35
+ "@huggingface/hub": "https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm",
36
+ "@mediapipe/tasks-genai": "https://cdn.jsdelivr.net/npm/@mediapipe/tasks-genai/+esm",
37
+ }
38
+ }
39
+ </script>
40
+ </head>
41
+ <body>
42
+ <img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl-dark.svg" alt="Sign in with Hugging Face" style="cursor: pointer; display: none;" id="signin">
43
+ <div class="loader-content" id="sign-in-message" style="display:none">
44
+ <p>Please sign in and make sure you've accepted the Gemma license.</p>
45
+ <p>You do not need to grant access to any of your organizations.</p>
46
+ </div>
47
+ <div id="loader-overlay" class="loader-overlay">
48
+ <div class="loader-content">
49
+ <p id="loader-message">Loading model...</p>
50
+ <div class="progress-bar">
51
+ <div id="progress-bar-fill" class="progress-bar-fill"></div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <main class="container" id="main-container">
56
+ <h1>Gemma 3n Multimodal Demo</h1>
57
+ <div class="video-container">
58
+ <video id="webcam" autoplay playsinline muted></video>
59
+ <p id="status-message">Requesting camera access...</p>
60
+ </div>
61
+ <div
62
+ id="response-container"
63
+ class="response-container"
64
+ aria-live="polite"
65
+ >
66
+ <p>Gemma's response will appear here.</p>
67
+ </div>
68
+ <div class="input-container">
69
+ <input
70
+ type="text"
71
+ id="prompt-input"
72
+ placeholder="Ask a question about what you see..."
73
+ aria-label="Question input"
74
+ />
75
+ <button
76
+ id="record-button"
77
+ title="Record audio question"
78
+ aria-label="Record audio question"
79
+ >
80
+ <i class="fa-solid fa-microphone"></i>
81
+ </button>
82
+ <button id="send-button" title="Send question" aria-label="Send question">
83
+ <i class="fa-solid fa-paper-plane"></i>
84
+ </button>
85
+ </div>
86
+ </main>
87
+ <script type="module" src="/index.js"></script>
88
+ </body>
89
  </html>