<jupyter_start><jupyter_text>Tangling up `interact`IPython's [`interact`]() can do some things that are awkward with straight widgets, such as generating plots. It will magically make built-in widgets from some simple settings objects.<jupyter_code>from IPython.html.widgets import interact
from math import (sin, cos, tan)
from ipytangle import tangle<jupyter_output><empty_output><jupyter_text>If you have defined an `interact` function, you can pull out all of the variables and put them in a tangle.Because you can only have one tangle per page right now, see [Interacting with a tangle](./Interacting with a tangle.ipynb).<jupyter_code>@interact
def interactor(fn=dict(sin=sin, cos=cos, tan=tan), x=(0, 360)):
    print(fn(x))<jupyter_output>-0.7265148944842826<jupyter_text>The [`fn_label`](:fn_label) functionThe [`fn_label`](:) of [`x`](:x) is... some number.<jupyter_code>trig_talk = tangle(interactor)
trig_talk<jupyter_output>-0.4629845264892503
{'fraction_non_alphanumeric': 0.11192468619246862, 'fraction_numerical': 0.0397489539748954, 'mean_word_length': 6.975, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '613477', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 356, 'n_tokens_neox': 325, 'n_words': 97, 'path': 'notebooks/examples/Tangling up interact.ipynb', 'repo_name': 'bollwyvl/ipytangle', 'size': '956'}