Spaces:
Runtime error
Runtime error
update js
Browse files- static/script.js +5 -1
static/script.js
CHANGED
@@ -13,5 +13,9 @@ textGenForm.addEventListener("submit", async (e) => {
|
|
13 |
const textGenInput = document.getElementById("text-gen-input");
|
14 |
const textGenParagraph = document.getElementById("text-gen-output");
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
17 |
});
|
|
|
13 |
const textGenInput = document.getElementById("text-gen-input");
|
14 |
const textGenParagraph = document.getElementById("text-gen-output");
|
15 |
|
16 |
+
try {
|
17 |
+
textGenParagraph.textContent = await translateText(textGenInput.value);
|
18 |
+
} catch (err) {
|
19 |
+
console.log(err);
|
20 |
+
}
|
21 |
});
|