gmerrill commited on
Commit
220d69e
·
1 Parent(s): cc93917
Files changed (2) hide show
  1. main.py +1 -0
  2. static/script.js +3 -1
main.py CHANGED
@@ -69,6 +69,7 @@ async def query_gorilla(req: Request):
69
  device=device,
70
  )
71
 
 
72
  output = pipe(prompt)
73
 
74
  return {
 
69
  device=device,
70
  )
71
 
72
+ log('Get answer ...')
73
  output = pipe(prompt)
74
 
75
  return {
static/script.js CHANGED
@@ -26,7 +26,9 @@ textGenForm.addEventListener('submit', async (event) => {
26
  textGenParagraph.textContent = "Awaiting response ...";
27
  const txtResp = await translateText(textGenInput.value);
28
  console.info(txtResp);
29
- textGenParagraph.textContent = JSON.stringify(JSON.parse(txtResp).val, null, 2);
 
 
30
  } catch (err) {
31
  console.error(err);
32
  }
 
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);
34
  }