Commit
•
ac1a23b
1
Parent(s):
637ba86
Update index.html
Browse files- index.html +5 -9
index.html
CHANGED
@@ -15,14 +15,7 @@
|
|
15 |
</script>
|
16 |
</head>
|
17 |
<body>
|
18 |
-
|
19 |
-
<h1>Welcome to your static Space!</h1>
|
20 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
|
21 |
-
<p>
|
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 |
-
</div>
|
26 |
<pre>
|
27 |
|
28 |
</pre>
|
@@ -33,8 +26,11 @@
|
|
33 |
|
34 |
if (oauthResult) {
|
35 |
document.querySelector("pre").textContent = JSON.stringify(oauthResult, null, 2);
|
|
|
36 |
} else {
|
37 |
-
|
|
|
|
|
38 |
}
|
39 |
</script>
|
40 |
</body>
|
|
|
15 |
</script>
|
16 |
</head>
|
17 |
<body>
|
18 |
+
<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" id="signin">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
<pre>
|
20 |
|
21 |
</pre>
|
|
|
26 |
|
27 |
if (oauthResult) {
|
28 |
document.querySelector("pre").textContent = JSON.stringify(oauthResult, null, 2);
|
29 |
+
document.getElementById("signin").remove();
|
30 |
} else {
|
31 |
+
document.getElementById("signin").onclick = async function() {
|
32 |
+
window.location.href = await oauthLoginUrl();
|
33 |
+
}
|
34 |
}
|
35 |
</script>
|
36 |
</body>
|