Spaces:
Sleeping
Sleeping
Update static/script.js
Browse files- static/script.js +3 -3
static/script.js
CHANGED
@@ -26,11 +26,11 @@ const generateText = async (text) => {
|
|
26 |
return data.output;
|
27 |
};
|
28 |
|
29 |
-
|
30 |
event.preventDefault();
|
31 |
-
console.log("Form submitted");
|
32 |
const textGenInput = document.getElementById("text-gen-input");
|
33 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
34 |
|
35 |
textGenParagraph.textContent = await generateText(textGenInput.value);
|
36 |
-
}
|
|
|
26 |
return data.output;
|
27 |
};
|
28 |
|
29 |
+
function handleFormSubmit(event) {
|
30 |
event.preventDefault();
|
31 |
+
console.log("Form submitted");
|
32 |
const textGenInput = document.getElementById("text-gen-input");
|
33 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
34 |
|
35 |
textGenParagraph.textContent = await generateText(textGenInput.value);
|
36 |
+
}
|