Spaces:
Sleeping
Sleeping
Commit
·
4805bda
1
Parent(s):
5794b1c
updated fetch function generateImage to fetch a relative URL, could fix the CORS issue.
Browse files- scripts.js +2 -1
scripts.js
CHANGED
@@ -384,7 +384,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
384 |
|
385 |
const sdPrompt = sdPromptElement.value;
|
386 |
|
387 |
-
fetch('
|
388 |
method: 'POST',
|
389 |
headers: {
|
390 |
'Content-Type': 'application/json'
|
@@ -404,6 +404,7 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
404 |
console.error('Error:', error);
|
405 |
});
|
406 |
}
|
|
|
407 |
function lockTextareas() {
|
408 |
const textareas = document.querySelectorAll('textarea');
|
409 |
|
|
|
384 |
|
385 |
const sdPrompt = sdPromptElement.value;
|
386 |
|
387 |
+
fetch('/generate-image', {
|
388 |
method: 'POST',
|
389 |
headers: {
|
390 |
'Content-Type': 'application/json'
|
|
|
404 |
console.error('Error:', error);
|
405 |
});
|
406 |
}
|
407 |
+
|
408 |
function lockTextareas() {
|
409 |
const textareas = document.querySelectorAll('textarea');
|
410 |
|