gmerrill commited on
Commit
83b990b
·
1 Parent(s): 77485e2
Files changed (1) hide show
  1. static/script.js +4 -1
static/script.js CHANGED
@@ -23,7 +23,10 @@ textGenForm.addEventListener('submit', async (event) => {
23
  const textGenParagraph = document.querySelector('.text-gen-output');
24
 
25
  try {
26
- textGenParagraph.textContent = await translateText(textGenInput.value);
 
 
 
27
  } catch (err) {
28
  console.error(err);
29
  }
 
23
  const textGenParagraph = document.querySelector('.text-gen-output');
24
 
25
  try {
26
+ textGenParagraph.textContent = "Awaiting response ...";
27
+ txtResp = await translateText(textGenInput.value);
28
+ console.info(txtResp)
29
+ textGenParagraph.textContent = JSON.parse(txtResp).val
30
  } catch (err) {
31
  console.error(err);
32
  }