boazchung commited on
Commit
c9e913f
1 Parent(s): 4962d88

Update visualqa.html

Browse files
Files changed (1) hide show
  1. visualqa.html +2 -2
visualqa.html CHANGED
@@ -139,10 +139,10 @@
139
  const question = document.getElementById("question").value.trim();
140
  document.getElementById("logs").textContent = "";
141
  const method = model_type === "document" ? hf.documentQuestionAnswering : hf.visualQuestionAnswering;
142
- const {answer, score} = await method({model, inputs: {
143
  image, question
144
  }});
145
- document.getElementById("logs").textContent = answer + ": " + score;
146
  } catch (err) {
147
  alert("Error: " + err.message);
148
  } finally {
 
139
  const question = document.getElementById("question").value.trim();
140
  document.getElementById("logs").textContent = "";
141
  const method = model_type === "document" ? hf.documentQuestionAnswering : hf.visualQuestionAnswering;
142
+ const {answer, score, start, end} = await method({model, inputs: {
143
  image, question
144
  }});
145
+ document.getElementById("logs").textContent = answer + ": " + score + start + end;
146
  } catch (err) {
147
  alert("Error: " + err.message);
148
  } finally {