Spaces:
Running
Running
File size: 1,962 Bytes
cab89a4 9f8f359 cab89a4 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
<!doctype html>
<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>
|