diff --git a/modules/ui_notebook.py b/modules/ui_notebook.py
index b4b859ee..7fbf7a85 100644
--- a/modules/ui_notebook.py
+++ b/modules/ui_notebook.py
@@ -85,5 +85,5 @@ def create_event_handlers():
lambda x: x + '.txt', gradio('prompt_menu-notebook'), gradio('delete_filename')).then(
lambda: gr.update(visible=True), None, gradio('file_deleter'))
- shared.gradio['textbox-notebook'].change(lambda x : f"{count_tokens(x)}", gradio('textbox-notebook'), gradio('token-counter-notebook'), show_progress=False)
+ shared.gradio['textbox-notebook'].input(lambda x : f"{count_tokens(x)}", gradio('textbox-notebook'), gradio('token-counter-notebook'), show_progress=False)
shared.gradio['get_logits-notebook'].click(logits.get_next_logits, gradio('textbox-notebook'), gradio('logits-notebook'))