example_shape['alternate_depth']) input_text = Div(text="Choose a GPU, AMP mode, and budget:", width=sidebar_width, height=30, style={ "display": "block", "margin": "0 auto", 'font-size': "125%", 'font-weight': "bold", "width": f"{sidebar_width}px", "text-align": 'center' }) initialize_optimal = Button(width=175, label="Initialize in 🤗transformers!") initialize_optimal.align = "center" initialize_optimal.on_click(on_optimal_click) results_buffer = Div(text="", width=sidebar_width, height=5, style=sidebar_div_style) initialize_alternate = Button(width=175, label="Initialize in 🤗transformers!") initialize_alternate.align = "center" initialize_alternate.on_click(on_alternate_click) code_box_style = { "display": "block", "margin": "0 auto", "width": f"{sidebar_width + plot_width}px", "text-align": 'center',
for (event of events) { console.log(event); var url = `${app}/waveform/${run}/${event}`; console.log(url); window.open(url) } """ # create a Javascript callback that will open an URL to view waveform callback_btn_waveform = CustomJS(args=dict(ms=multi_select, run=run_id, app=APP_URL), code=code) btn_waveform = Button(label="View Waveform for Chosen Events") btn_waveform.js_on_click(callback_btn_waveform) btn_waveform.disabled = True btn_waveform.align = "center" btn_waveform.height = 30 btn_waveform.margin = (20, 0, 0, 0) # add a btn to clear all options in multi select def callback_btn_clear(): """ Clears all optiosn in the multi select and disables buttons """ doc.add_next_tick_callback(partial(disable_btn, btn=btn_clear)) doc.add_next_tick_callback(partial(disable_btn, btn=btn_waveform)) doc.add_next_tick_callback( partial(clear_options, multi_select=multi_select))