mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-10-01 01:26:03 -04:00
Only update notebook token counter on input
For performance during streaming
This commit is contained in:
parent
41b98e07fb
commit
6cca8b8028
@ -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"<span>{count_tokens(x)}</span>", gradio('textbox-notebook'), gradio('token-counter-notebook'), show_progress=False)
|
||||
shared.gradio['textbox-notebook'].input(lambda x : f"<span>{count_tokens(x)}</span>", 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'))
|
||||
|
Loading…
Reference in New Issue
Block a user