Spaces:
Running
Running
yasir commited on
Update script.js
Browse files297 unmodified lines298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337297 unmodified lines});}*/function final1(){const id = idlist[0].trim().replace(/^"|"$/g, '');fetch(url2, {method: 'POST',headers: {'Content-Type': 'application/json',},body: JSON.stringify({id: id,}),}).then((response)=>{if (response.status === 500) {pi.innerText = 'you have reached your limit of 50 generation per hour, you will get 50 more image generaions after an hour!!'}}).then((response) => response.text()).then((data) => {const img = document.createElement('img');pi.innerHTML = ''pi.innerText = ''img.src = data.trim().replace(/^"|"$/g, '');div.appendChild(img);btn.disabled = falseconsole.log(data)}).catch((error) => {btn.disabled = falseconsole.error('An error occurred:', error);pi.innerText =`An error occurred, try changing your prompt or use "Realistic Vision" Model for NSFW ${error}`;});}final1()297 unmodified lines298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330297 unmodified lines});}*/function final1(){const id = idlist[0].trim().replace(/^"|"$/g, '');fetch(url2, {method: 'POST',headers: {'Content-Type': 'application/json',},body: JSON.stringify({id: id,}),}).then((response) => response.text()).then((data) => {const img = document.createElement('img');pi.innerHTML = ''pi.innerText = ''img.src = data.trim().replace(/^"|"$/g, '');div.appendChild(img);btn.disabled = falseconsole.log(data)}).catch((error) => {btn.disabled = falseconsole.error('An error occurred:', error);pi.innerText = 'An error occurred, try changing your prompt';});}final1()
script.js+25-32