def display_error(): """ Displays error message in the document after clearing it """ doc.remove_root(doc.roots[0]) div = Div(text="Events Not Available") div.margin = (200, 0, 0, 300) div.align = "center" div.height = 100 div.sizing_mode = "scale_width" doc.add_root(div)
"font-family": "monospace", "font-size": "15px", "line-height": "1.6", "max-width": "100%", "overflow": "hidden", "min-height": "30px", "word-wrap": "break-word" } code_box = Div( text= "Find the right model for you with the curves and sliders then click the buttons to display the " "corresponding 🤗transformers code here!", width=sidebar_width + plot_width, style=code_box_style, sizing_mode="scale_width") code_box.align = "center" ######################################################################################################################## # Add write-up text ######################################################################################################################## text_width = "800px" main_text_style = { "min-height": "100px", "overflow": "hidden", "display": "block", "margin": "auto", "width": text_width, "font-size": "18px" }