File size: 1,243 Bytes
8f1463e
 
 
 
 
 
 
0244bd5
 
 
 
 
 
 
 
8f1463e
 
 
 
 
 
 
 
 
 
637ba86
 
 
c0277c1
637ba86
c0277c1
637ba86
 
 
 
 
 
 
6f6404b
8f1463e
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width" />
		<title>My static Space</title>
		<link rel="stylesheet" href="style.css" />
        <script src="https://unpkg.com/es-module-shims@1.7.0/dist/es-module-shims.js"></script>
		<script type="importmap">
			{
				"imports": {
					"@huggingface/hub": "https://cdn.jsdelivr.net/npm/@huggingface/hub@0.12.3-oauth/+esm"
				}
			}
		</script>
	</head>
	<body>
		<div class="card">
			<h1>Welcome to your static Space!</h1>
			<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
			<p>
				Also don't forget to check the
				<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
			</p>
		</div>
      <pre>
        
      </pre>
      <script type="module">
        import { oauthLoginUrl, oauthHandleRedirectIfPresent } from "@huggingface/hub";

        const oauthResult = await oauthHandleRedirectIfPresent();

        if (oauthResult) {
          document.querySelector("pre").textContent = JSON.stringify(oauthResult, null, 2);
        } else {
          window.location.href = await oauthLoginUrl();
        }
      </script>
	</body>
</html>