Spaces:
Running
Running
Update index.html
Browse files- index.html +11 -1
index.html
CHANGED
|
@@ -5,6 +5,14 @@
|
|
| 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">
|
|
@@ -14,6 +22,8 @@
|
|
| 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>
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
<title>My static Space</title>
|
| 7 |
<link rel="stylesheet" href="style.css" />
|
| 8 |
+
<script>
|
| 9 |
+
window.addEventListener("message", event => {
|
| 10 |
+
console.log("event", event);
|
| 11 |
+
if (event.data.type === "INFERENCE_JWT_RESPONSE") {
|
| 12 |
+
document.querySelector("#token").textContent = JSON.stringify(event.data, null, 2);
|
| 13 |
+
}
|
| 14 |
+
})
|
| 15 |
+
</script>
|
| 16 |
</head>
|
| 17 |
<body>
|
| 18 |
<div class="card">
|
|
|
|
| 22 |
Also don't forget to check the
|
| 23 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 24 |
</p>
|
| 25 |
+
<button onclick="window.parent?.postMessage({type: 'INFERENCE_JWT_REQUEST'}, ''*'');">Request token</button>
|
| 26 |
+
<pre id="token">...</pre>
|
| 27 |
</div>
|
| 28 |
</body>
|
| 29 |
+
</html>
|