gmerrill commited on
Commit
9df5fa1
·
1 Parent(s): 220d69e
Files changed (1) hide show
  1. static/script.js +2 -2
static/script.js CHANGED
@@ -24,10 +24,10 @@ textGenForm.addEventListener('submit', async (event) => {
24
 
25
  try {
26
  textGenParagraph.textContent = "Awaiting response ...";
 
27
  const txtResp = await translateText(textGenInput.value);
28
  console.info(txtResp);
29
- const start = Date.now()
30
- textGenParagraph.textContent = JSON.stringify(JSON.parse(txtResp).val[0]['generated_text'], null, 2) + '\n\n' + 'Took ' + (Date.now() - start) + 'ms';
31
 
32
  } catch (err) {
33
  console.error(err);
 
24
 
25
  try {
26
  textGenParagraph.textContent = "Awaiting response ...";
27
+ const start = Date.now()
28
  const txtResp = await translateText(textGenInput.value);
29
  console.info(txtResp);
30
+ textGenParagraph.textContent = JSON.parse(txtResp).val[0] + '\n\n' + 'Took ' + (Date.now() - start) + 'ms';
 
31
 
32
  } catch (err) {
33
  console.error(err);