Skip to content

Commit

Permalink
Make Emotion demo wait for the user to finish typing (#38)
Browse files Browse the repository at this point in the history
* emotion demo: wait until the user is finished typing

---------

Co-authored-by: Luca Invernizzi <invernizzi@google.com>
  • Loading branch information
invernizzi and invernizzi-at-google authored Nov 10, 2023
1 parent 0a96f41 commit d5f7a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demos/js/src/components/EmotionDemo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const runInference = debounce(async () => {
topKprediction.values.dispose();
topKprediction.indices.dispose();
// Debounce this inference so that we only run it after typing has stopped.
}, 150);
}, 500);
// When the user types something, trigger the model.
watch(userText, async () => {
Expand Down

0 comments on commit d5f7a48

Please sign in to comment.