Try update to Spaces copy link.
Browse files- templates.py +4 -2
templates.py
CHANGED
@@ -176,8 +176,10 @@ def copy_share_link_js(demo_type: DemoType) -> str:
|
|
176 |
const url = new URL(window.location.href);
|
177 |
url.searchParams.set('requirements', requirements);
|
178 |
url.searchParams.set('code', code);
|
179 |
-
|
180 |
-
|
|
|
|
|
181 |
}}"""
|
182 |
raise NotImplementedError(f'{demo_type} is not a supported demo type')
|
183 |
|
|
|
176 |
const url = new URL(window.location.href);
|
177 |
url.searchParams.set('requirements', requirements);
|
178 |
url.searchParams.set('code', code);
|
179 |
+
// TODO: Figure out why link doesn't load as expected in Spaces.
|
180 |
+
const shareLink = url.toString().replace('gstaff-kitewind.hf.space', 'huggingface.co/spaces/gstaff/KiteWind');
|
181 |
+
await navigator.clipboard.writeText(shareLink);
|
182 |
+
return [code, requirements];
|
183 |
}}"""
|
184 |
raise NotImplementedError(f'{demo_type} is not a supported demo type')
|
185 |
|