Spaces:
Running
Running
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>My static Space</title> | |
<link rel="stylesheet" href="style.css" /> | |
<script> | |
function run(url_in) { | |
let url = String(url_in) | |
console.log(url); | |
var framediv = document.getElementById('cap'); | |
let child = framediv.lastElementChild; | |
while (child) { | |
framediv.removeChild(child); | |
child=framediv.lastElementChild; | |
} | |
const iframediv = document.createElement('iframe'); | |
iframediv.src = 'https://docs.google.com/viewer?url=' + url +'&embedded=true'; | |
iframediv.width = '100%'; | |
iframediv.height = '1000px'; | |
iframediv.frameborder="0"; | |
framediv.appendChild(iframediv); | |
} | |
function () { | |
const urlParams = new URLSearchParams(window.location.search); | |
var p_pdf = urlParams.get('pdfurl') | |
var p_mod = urlParams.get('mod') | |
var p_len = urlParams.get('len') | |
var p_nos = urlParams.get('nos') | |
var p_wid = urlParams.get('wid') | |
var p_pau = urlParams.get('pau') | |
if (p_mod) { | |
console.log(p_mod) | |
} else { | |
p_mod = "en_US-joe-medium"; | |
}; | |
if (p_len) { | |
console.log(p_len) | |
} else { | |
p_len = "1"; | |
}; | |
if (p_nos) { | |
console.log(p_nos) | |
} else { | |
p_nos = "0.5"; | |
}; | |
if (p_wid) { | |
console.log(p_wid) | |
} else { | |
p_wid = "0.5"; | |
}; | |
if (p_pau) { | |
console.log(p_pau) | |
} else { | |
p_pau = "1"; | |
}; | |
run(p_pdf) | |
return [p_pdf, p_mod, p_len, p_nos, p_wid, p_pau]; | |
} | |
</script> | |
</head> | |
<body> | |
<div class="card"> | |
<h1>Welcome to your static Space!</h1> | |
<p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> | |
<p> | |
Also don't forget to check the | |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. | |
</p> | |
</div> | |
</body> | |
</html> | |