Spaces:
Runtime error
Runtime error
update
Browse files- static/script.js +1 -2
static/script.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
const textGenForm = document.querySelector(".text-gen-form")
|
2 |
|
3 |
const translateText = async (text) => {
|
|
|
4 |
const inferResponse = await fetch('infer_t5?input=${text}');
|
5 |
const inferJson = await inferResponse.json();
|
6 |
|
@@ -13,8 +14,6 @@ textGenForm.addEventListener("submit", async (e) => {
|
|
13 |
const textGenInput = document.getElementById("text-gen-input");
|
14 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
15 |
|
16 |
-
console.log('start translate');
|
17 |
-
|
18 |
try {
|
19 |
textGenParagraph.textContent = await translateText(textGenInput.value);
|
20 |
console.log(textGenParagraph.textContent);
|
|
|
1 |
const textGenForm = document.querySelector(".text-gen-form")
|
2 |
|
3 |
const translateText = async (text) => {
|
4 |
+
console.log('start translate');
|
5 |
const inferResponse = await fetch('infer_t5?input=${text}');
|
6 |
const inferJson = await inferResponse.json();
|
7 |
|
|
|
14 |
const textGenInput = document.getElementById("text-gen-input");
|
15 |
const textGenParagraph = document.querySelector(".text-gen-output");
|
16 |
|
|
|
|
|
17 |
try {
|
18 |
textGenParagraph.textContent = await translateText(textGenInput.value);
|
19 |
console.log(textGenParagraph.textContent);
|