In [7]:
def add(x, y):
return x + y
In [8]:
from ipywidgets import widgets, interact
from IPython.display import display
In [9]:
text = widgets.Text()
display(text)
def handle_submit(sender):
print(text.value)
text.on_submit(handle_submit)
In [12]:
interact(add, x=[0, 10], y=[0, 10])
In [ ]:
In [ ]: