workaround for + in spaces

This commit is contained in:
aliabd 2021-12-23 18:30:03 +04:00
parent 24405444f1
commit 5a25bc27f1

View File

@ -447,6 +447,11 @@
var len_outputs = {{ len_outputs }};
var url = window.location.href;
// workaround for spaces issue
if (url.includes("hf.space")) {
url = url.slice(0,-3) + "+/api"
}
const stripTrailingSlash = (str) => {
return str.endsWith('/') ?
str.slice(0, -1) :