yasir commited on
Commit
e3a66bb
·
verified ·
1 Parent(s): 37fc91f

Update script.js

Browse files
Files changed (1) hide show
  1. script.js +3 -10
script.js CHANGED
@@ -315,14 +315,7 @@ if(isreal == false){
315
  })
316
  .then((response) => response.text())
317
  .then((data) => {
318
- if(data==`<!doctype html>
319
- <html lang=en>
320
- <title>500 Internal Server Error</title>
321
- <h1>Internal Server Error</h1>
322
- <p>The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.</p>`){
323
- pi.innerText = 'you have rea'
324
- }
325
- else{
326
  const img = document.createElement('img');
327
  pi.innerHTML = ''
328
  pi.innerText = ''
@@ -330,13 +323,13 @@ if(isreal == false){
330
  div.appendChild(img);
331
  btn.disabled = false
332
  console.log(data)
333
- }
334
  })
335
 
336
  .catch((error) => {
337
  btn.disabled = false
338
  console.error('An error occurred:', error);
339
- pi.innerText =`An error occurred, try changing your prompt or use "Realistic Vision" Model for NSFW`;
340
  });
341
  }
342
 
 
315
  })
316
  .then((response) => response.text())
317
  .then((data) => {
318
+
 
 
 
 
 
 
 
319
  const img = document.createElement('img');
320
  pi.innerHTML = ''
321
  pi.innerText = ''
 
323
  div.appendChild(img);
324
  btn.disabled = false
325
  console.log(data)
326
+
327
  })
328
 
329
  .catch((error) => {
330
  btn.disabled = false
331
  console.error('An error occurred:', error);
332
+ pi.innerText =`An error occurred, try changing your prompt or use "Realistic Vision" Model for NSFW ${error}`;
333
  });
334
  }
335