dwb2023 commited on
Commit
3fb09f5
·
1 Parent(s): 762ae41

Update with latest build

Browse files
Files changed (1) hide show
  1. index.html +7 -0
index.html CHANGED
@@ -2,6 +2,13 @@
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8" />
 
 
 
 
 
 
 
5
  <link rel="icon" type="image/svg+xml" href="/logo.png" />
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
  <title>Transformers.js Examples</title>
 
2
  <html lang="en">
3
  <head>
4
  <meta charset="UTF-8" />
5
+ <meta http-equiv="Content-Security-Policy" content="connect-src 'self' https://*.huggingface.co https://*.hf.space ws: wss: blob: data:; default-src 'self' 'unsafe-inline' 'unsafe-eval' https: data: blob:;">
6
+ <script>
7
+ // Detect if we're in the Hugging Face wrapper and redirect to static site if needed
8
+ if (window.location.href.includes('huggingface.co/spaces') && !window.location.href.includes('.static.hf.space')) {
9
+ window.location.href = "https://dwb2023-transformers-js-demos.static.hf.space/";
10
+ }
11
+ </script>
12
  <link rel="icon" type="image/svg+xml" href="/logo.png" />
13
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
14
  <title>Transformers.js Examples</title>