Priyansh Saxena commited on
Commit
e1b869e
·
1 Parent(s): b0f7665

FIX: Generate static asset URLs via request.url_for for HF Spaces path compatibility

Browse files
Files changed (1) hide show
  1. templates/index.html +2 -2
templates/index.html CHANGED
@@ -14,7 +14,7 @@
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" id="hljs-theme">
15
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
16
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
17
- <link rel="stylesheet" href="/static/styles.css">
18
  </head>
19
  <body>
20
  <!-- Toast notification -->
@@ -119,6 +119,6 @@
119
  </main>
120
  </div>
121
 
122
- <script src="/static/app.js"></script>
123
  </body>
124
  </html>
 
14
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css" id="hljs-theme">
15
  <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
16
  <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" rel="stylesheet">
17
+ <link rel="stylesheet" href="{{ request.url_for('static', path='styles.css') }}">
18
  </head>
19
  <body>
20
  <!-- Toast notification -->
 
119
  </main>
120
  </div>
121
 
122
+ <script src="{{ request.url_for('static', path='app.js') }}"></script>
123
  </body>
124
  </html>