<jupyter_start><jupyter_text>Complex widget GUIThis is representative of some of the more complex interfaces we've seen people build with widgets.  We've seen a few minor style/layout differences but otherwise it works fine in voila!<jupyter_code>from ipywidgets import widgets, Layout
from IPython.display import clear_output
def callback(w):
    with output:
        clear_output()
        print(location.value, date.value)
        print(name.value, age.value)
        print(opt1.value, opt2.value, opt3.value, description.value)
        print(color.value, animal.value)
        
# Inner tab 1a
location = widgets.Text(value='London', description='Location', layout=Layout(width='75%'))
date = widgets.DatePicker(description='Date')
tab1a = widgets.VBox(children=[location, date])

# Inner tab 1b
name = widgets.Text(value='John', description='Name')
age = widgets.IntSlider(value=5, min=1, max=100, description='Age')
tab1b = widgets.VBox(children=[name, age])

# Inner tab 2a
opt1 = widgets.Checkbox(value=False, description='opt1')
opt2 = widgets.Checkbox(value=False, description='opt2')
opt3 = widgets.Checkbox(value=True, description='opt3')
options = widgets.HBox(children=[opt1, opt2, opt3])
description = widgets.Textarea(description='description', rows=3)
tab2a = widgets.VBox(children=[options, description])

# Inner tab 2b
color = widgets.ColorPicker()
animal = widgets.Dropdown(options=['cat', 'dog', 'bird'])
tab2b = widgets.VBox(children=[color, animal])

# Outer tabs
tab1 = widgets.Tab(children=[tab1a, tab1b])
tab1.set_title(0, 'Tab 1a')
tab1.set_title(1, 'Tab 1b')
tab2 = widgets.Tab(children=[tab2a, tab2b])
tab2.set_title(0, 'Tab 2a')
tab2.set_title(1, 'Tab 2b')

# Final GUI
output = widgets.Output()
title = widgets.HTML(value="<h2 style='text-align:center'>Widget GUI</h2>")
tabs = widgets.Tab(children=[tab1, tab2])
tabs.set_title(0, 'Tab 1')
tabs.set_title(1, 'Tab 2')
submit = widgets.Button(description='Submit')
submit.on_click(callback)
gui = widgets.VBox(children=[title, tabs, submit, output])
gui<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1454898157129001, 'fraction_numerical': 0.026188166828322017, 'mean_word_length': 6.065068493150685, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '35045', 'license': 'MIT', 'n_tokens_mistral': 730, 'n_tokens_neox': 702, 'n_words': 161, 'path': 'voila/complex_gui.ipynb', 'repo_name': 'nbgallery/dashboards', 'size': '2062'}