alihmaou commited on
Commit
9d7476b
·
verified ·
1 Parent(s): 9a9bf37

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +22 -19
index.html CHANGED
@@ -1,19 +1,22 @@
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
+ <head>
2
+ <style> body { margin: 0; } </style>
3
+
4
+ <script src="//unpkg.com/3d-force-graph"></script>
5
+ <!-- <script src="../../dist/3d-force-graph.js"></script>-->
6
+ </head>
7
+
8
+ <body>
9
+
10
+ <div id="3d-graph"></div>
11
+
12
+ <script>
13
+ const elem = document.getElementById('3d-graph');
14
+
15
+ const Graph = new ForceGraph3D(elem)
16
+ .jsonUrl('./forcegraphdata.json')
17
+ .nodeAutoColorBy('group')
18
+ .nodeLabel(
19
+ node => `${node.group}: ${node.id} - ${node.details}`)
20
+ ;
21
+ </script>
22
+ </body>