<jupyter_start><jupyter_text>Jupyter Interactive widgetsThe notebook comes alive with the interactive widgets:- Part of the Jupyter project- BSD Licensed**Installation for the legacy notebook:**```bashconda install -c conda-forge ipywidgets```  Speeding up the bottleneck in the REPL<jupyter_code>12 * 12
def f(x, y):
    print(x * y)
from ipywidgets import *
from traitlets import dlink
interact(f, x=(0, 100), y=['a',  'b']);<jupyter_output><empty_output><jupyter_text>Interactive Jupyter widgets<jupyter_code>slider = FloatSlider(
    value=7.5,
    min=5.0,
    max=10.0,
    step=0.1,
    description='Input:',
)

slider
slider
slider.value = 8
slider.keys
slider.readout_format = '.4f'
text = FloatText(description='Value')
dlink((slider, 'value'), (text, 'value'))
text
slider<jupyter_output><empty_output><jupyter_text>Widgets are represented in the back-end by a single object.  Each time a widget is displayed, a new representation of that same object is created in the front-end.  These representations are called views.![Kernel & front-end diagram](images/WidgetModelView.png)<jupyter_code>slider
ft = FloatText()
def foo(change):
    ft.value = change.new

slider.observe(foo, names=['value'])
ft
from ipywidgets import HBox
HBox([slider, slider, ft])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11901081916537867, 'fraction_numerical': 0.014683153013910355, 'mean_word_length': 5.780104712041885, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '143426', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 450, 'n_tokens_neox': 431, 'n_words': 123, 'path': 'pylondinium/notebooks/widgets.ipynb', 'repo_name': 'jtpio/quantstack-talks', 'size': '1294'}