def plot_distributions(df,cols,theme): out_plots=[] for col in cols: if df[col].dtype=='object': figure=px.histogram(df, x=col, color_discrete_sequence=['tomato'],template=theme,hover_data=df.columns) figure.update_xaxes(showgrid=False) figure.update_yaxes(showgrid=False) figure.update_layout(title_text=f'Histogram of {col}') value,n=get_missing_valaues(df,col) progress=dbc.Progress(style={"height": "20px","margin":"10px 20px 10px 20px"},children=[dbc.Progress(f"{df.shape[0]-n} missing values", value=value, color="success", bar=True), dbc.Progress(style={"height": "20px"},value=100-value,color="danger", bar=True)],multi=True,) out_plots.append(html.Div(children=[progress,dcc.Graph(figure=figure)])) else: figure=px.histogram(df, x=col, color_discrete_sequence=['tomato'],template=theme,marginal="box",hover_data=df.columns) figure.update_xaxes(showgrid=False) figure.update_yaxes(showgrid=False) figure.update_layout(title_text=f'Histogram of {col}') value,n=get_missing_valaues(df,col) progress=dbc.Progress(style={"height": "20px","margin":"10px 20px 10px 20px"},children=[dbc.Progress(f"{df.shape[0]-n} missing values", value=value, color="success", bar=True), dbc.Progress(value=100-value, color="danger", bar=True)],multi=True) out_plots.append(html.Div(children=[progress,dcc.Graph(figure=figure)])) return out_plots
def get_weekly_meetings_card(weekly_meeting: WeeklyMeetings, current: bool = False): progress = weekly_meeting.get_progres() progress_bar_color = get_progress_bar_color(progress=progress) if current == True: checklist_disabled = False id_progress_bar = "progress-bar" progress_bar = dbc.Progress( value=progress, color=progress_bar_color, id=id_progress_bar, ) else: checklist_disabled = True progress_bar = dbc.Progress( value=progress, color=progress_bar_color, ) checklists = [ get_checklist(meeting=meeting, disabled=checklist_disabled) for meeting in weekly_meeting ] len_column = int(len(checklists) / 2) checklist_col_1 = checklists[:len_column] checklist_col_2 = checklists[len_column:] card = dbc.Card( [ dbc.CardBody([ html.H4( "Semaine du {} au {}".format(weekly_meeting.start_date, weekly_meeting.end_date), className="card-title", ), progress_bar, # checklist_meetings, dbc.Row( [ dbc.Col(checklist_col_1), dbc.Col(checklist_col_2), ], className="m-4", ), ]), ], className="m-5", ) return card
def model_loading_progress(n_intervals): if n_intervals is None: _logger.debug('Prevent loading status update') raise PreventUpdate if self.progress.num_steps is None: _logger.debug( 'Prevent loading status update as progress setup incomplete' ) raise PreventUpdate status = self.progress.get_status() progress_color = "danger" if status[1] == Progress.ERROR else "info" progress_message = 'Step %d - %s' % (self.progress.current_step, status[2]) progress_percent = int(self.progress.current_step / self.progress.num_steps * 100) return [ html.H2('Loading model "%s"' % self.model_path), dbc.Progress(value=progress_percent, striped=True, color=progress_color), html.H3(progress_message), html.H3('On going: %s' % self.progress.next if self.progress.next else '') ]
def showtimer(btn1, port, id, inc, time_s, btn2, t_id, btn3, t_csv, set1, set2, p_area, fs, pw, wf): changed_id = [p['prop_id'] for p in dash.callback_context.triggered][0] if ('start-btn' in changed_id and port is not None and id is not None and inc is not None and time_s is not None and p_area is not None and set1 is not None and set2 is not None and fs is not None and pw is not None and wf is not None): try: style_test = {'display': 'none'} id = 'Test ID: ' + id inc = 'Increment no: ' + str(inc) set1 = 'Initial DG-1: ' + str(set1) + 'cm' set2 = 'Initial DG-2: ' + str(set2) + 'cm' wf = 'Width of Footing: ' + str(wf) + 'm' fs = 'Factor of Safety: ' + str(fs) time_x = 'Time: ' + str(time_s) + ' minute/s' plus = 1100 return style_test,[dbc.Progress(value=0, id='progressb',color='success', style={'height': '30px', 'fontSize': '10px'}), dcc.Interval(id="progress-interval", n_intervals=0, interval=plus)], \ id, inc,set1,set2,fs, time_x, {'display': 'inline-block'}, wf except: raise PreventUpdate else: raise PreventUpdate
def progress_bar_ic(stats): pc = stats["last_ic"] * 100 / 6458 progress = dbc.Progress(str(round(pc)) + "%", value=pc, striped=True, style={"height": "2rem"}) return progress
def homepage_layout(): landing_page_layout = dbc.Jumbotron([ html.H1('NBA Viz Tool', className='display-3'), html.P(children=[ 'NBA Visualization tool using data from ', html.A('Basketball Reference', href='https://www.basketball-reference.com')], className='lead'), html.P(children=[ 'Developed by Alexander Ilyin: ', html.A('Github Link', href='https://github.com/alexilyin1')], className='lead'), html.Hr(className='my-2'), html.P( dbc.Button('Press Here to Scrape', id='scrape_button') ), html.Div(children=[ dcc.Interval(id='progress-interval', n_intervals=59, interval=5), dbc.Progress(id='progress') ]), html.Hr(className='my-2'), html.P(children=[ dbc.Button(html.A('Visualization Tools', href='/viz')), ' ', dbc.Button(html.A('Player Comparison', href='/pcomp')), ' ', dbc.Button(html.A('Analytics Tools', href='/analytics')) ]), html.P(id='temp') ], fluid=True ) return landing_page_layout
def grid_layout(self): return html.Div([ dcc.Interval( id='interval-component', interval=self.updateInterval*1000, # in milliseconds n_intervals=0 ), dbc.Row([ # Display vertical Table dbc.Col([ html.P("""Live table displays the stage's indexed X/Y, current absolute X/Y stage position, expected absolute X/Y stage position, and the difference between current and expected absolute X/Y stage position"""), html.P("Newer entries appear at the top of the table."), dbc.Table(id='table-points', bordered=True, style={'textAlign': 'center'}) ], xl=5, width=12, style={'maxHeight': '30rem', 'overflowY': 'scroll', 'marginBottom': '1rem'}), # Display scan estimation/data dbc.Col([ html.Div(self.getTitleAttributes(), id='title-attributes'), dbc.Card([ dbc.CardHeader(html.H4("Scan Estimation")), dbc.CardBody([ html.P('N/A', id='estimation-progress-p'), dbc.Progress(value=0, id="estimation-progress-bar", striped=True, animated=True), ]) ]) ], xl=7, width=12) ], style={'margin': '1rem'}) ])
def progressBarOn(contents,name): if name is None: return "" print("=== on_soundUpload") # data = contents.encode("utf8").split(b";base64,")[1] children =[dcc.Interval(id="progress-interval", n_intervals=0, interval=500), dbc.Progress(id="progress", striped=True)] return children
def habit_card(habit: str, created: datetime.datetime, updated: datetime.datetime, text: str, progress: int, color: str): return html.Div([ dbc.Card( [ dbc.CardHeader(f"{habit}"), dbc.CardBody([ html.P( f"{text}", className=f"card-text-{habit}", ), dbc.Progress(value=progress, id={ 'type': 'progress-bar', 'index': habit }, striped=True, style={"margin-bottom": 10}, animated=True, color=color, max=23), dbc.Button("Stop habit", id={ 'type': 'stop-habit-button', 'index': habit }, color="danger"), dbc.Button("Start over", id={ 'type': 'restart-button', 'index': habit }, color="info", style={"margin-left": 10}), dbc.Button("Did it today!", id={ 'type': 'increment-button', 'index': habit }, color="success", style={"float": "right"}), html. P(f"created: {type(created)} {created.day}, last update: {updated}" ), ]), ], id={ 'type': 'habit-card', 'index': habit }, #color="success", outline=True, style={ "width": "100%", "margin-top": 10 }, ) ])
def _progress() -> Component: progress = dbc.Progress(value=5, id=_PROGRESS_BAR, striped=True, animated=True, style={'height': '25px'}) return html.Div(progress, hidden=True, id=_PROGRESS_BAR_WRAPPER, className='mt-3 mb-3')
def createTaskInProgressReport(taskId): return html.Div(id=f'task-{taskId}', children=[ html.P(f'Task {taskId}', style={'padding': '10px'}), html.Div(children=[ dbc.Progress(id=f'progress-{taskId}'), ], style={'margin': '5px 20px'}), dbc.Button(id={ 'type': 'abort-button', 'index': taskId }, children=['Abort'], style={ 'margin': '10px auto', 'display': 'block' }) ], className='shadow bg-light', style={ 'padding': '5px', 'margin': '10px 0', 'border-radius': '5px', })
df = df[df["Classe Age"] == 0] df = df[df["Date"] == max(df["Date"])] dose1 = df["Cumul Dose 1"] dose2 = df["Cumul complet"] pop = 67407000 # au 29 Mars 2021 card_vacs = [ dbc.CardHeader("Personnes vaccinées",style={"background-color":"#28a745", "color":"white"}), dbc.CardBody( [ dbc.Row([ html.H2(dose1), html.P("Dose 1",style={"margin": "11px"}) ],style={"display":"flex"}), dbc.Row([ dbc.Progress(str(str(int(round(dose1*100/pop,0)))+"%"), value=dose1*100/pop) ], style={"display":"block","margin-bottom":"11px"}), dbc.Row([ html.H2(dose2), html.P("Dose 2",style={"margin": "11px"}) ],style={"display":"flex"}), dbc.Row([ dbc.Progress(str(str(int(round(dose2*100/pop,0)))+"%"), value=dose2*100/pop, color="success") ],style={"display":"block","margin-bottom":"10px"}) ] ), ] cards = dbc.Row( [ dbc.Col(dbc.Card(card_cas, color="primary", outline=True)),
def init_feeder(server): """Create the plots using plotly and dash.""" dash_app = dash.Dash( __name__, server=server, routes_pathname_prefix='/part-feeder/feeder/', update_title=None, title='Part Feeder', external_scripts=[ "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" ], external_stylesheets=[dbc.themes.BOOTSTRAP]) dash_app.layout = html.Div([ dcc.Location(id='url', refresh=False), html.Div( id='page-content', style={'visibility': 'hidden'}, children=[ html.Div(id='plots', ), # this displays all the plots and explanations dcc.Interval(id='data_update_interval', interval=8_000, disabled=False), dcc.Interval(id='anim_update_interval', interval=50, disabled=False), dcc.Store(id='anim_data', data=[], storage_type='memory'), dcc.Store( id= 'anim_holding_data', # hold data here, wait for clientside callback to update it. data=[], storage_type='memory'), dcc.Store( id='prev_anim', storage_type='memory', ), dcc. Store( # holds information like the plans, transfer functions, etc. id='anim_state', data={}, storage_type='memory'), dcc. Store( # holds the angles of all the polygons the last time this was queried. id='anim_angles', data={ 'sqPolygonAngles': [], 'pgPolygonAngles': [] }, storage_type='memory'), dcc. Dropdown( # dropdown selector to determine which animation to display. id='anim_selector', options=[{ 'label': 'Squeeze Plan', 'value': sq_anim }, { 'label': 'Push Grasp Plan', 'value': pg_anim }, { 'label': 'Stop Animation', 'value': stop }], searchable=False, style={'display': 'block'}, clearable=False, value=pg_anim), dcc.Graph( # animation figure id='anim', style={ 'height': '50vh', 'margin': 'auto', 'display': 'block' }, config={ 'displayModeBar': False, 'staticPlot': True }), dcc.Markdown( id='contact', style={ 'text-align': 'center', 'padding-top': '20px', 'padding-bottom': '20px' }, children= '''For questions, comments or other thoughts, contact us at: *vincentklim {at} berkeley.edu* or *goldberg {at} berkeley.edu*''' ) ]), html.Div(id='loading_div', children=[ 'Loading...', html.Br(), dbc.Progress(id='loading_bar'), html.Div(id='loading_text', children=[], style={ 'margin': 'auto', 'width': '100%', 'padding': '10px', 'text-align': 'center', 'font-size': 'large', 'white-space': 'pre-wrap' }), dcc.Interval(id='loading_interval', interval=1000, disabled=False) ], style={ 'display': 'block', 'width': '50%', 'left': '25%', 'position': 'absolute', 'top': '25%' }) ]) init_callbacks(dash_app) return dash_app.server
"lineHeight": "60px", "borderWidth": "1px", "borderStyle": "dashed", "borderRadius": "5px", "textAlign": "center", "margin": "auto", }, multiple=True,)), dbc.Col(html.Div("")) ]), dcc.Interval(id="progress-interval", n_intervals=0, interval=500), dbc.Progress(id="progress", style={ "width": "70%", "lineHeight": "60px", "borderWidth": "1px", "borderRadius": "5px", "textAlign": "center", "margin": "auto", },), dbc.Row( [ dbc.Col(html.H2( id="emotion-title", children = "Emotion Detected", ),), dbc.Col(html.H2( id="sex-title", children = "Sex Detected" ),) ]), dbc.Row(
'borderRadius': '5px', 'textAlign': 'center', 'margin': '10px' }, # Allow multiple files to be uploaded multiple=True), html.Div(id='output-data-upload'), ], width=12)), dbc.Row( dbc.Col([ dbc.Progress(id="progress-bar", value=progress_bar_value.counter, striped=True, color="success", animated=True, style={ "margin": "10px", "height": "30px", "font-size": "15px" }) ], width=12), ), dbc.Row([ dbc.Col(dbc.Button("Download Content", id="content-download-btn", n_clicks=0, color="primary", disabled=True), width=2), dbc.Col(dbc.Button("Analyze Content", id="content-analyze-btn",
def update_budget_card_contents(n1, n2, yearMonth, jsonified_data, json_budget_df): user_df = jsonified_data_to_dataframe(jsonified_data) category_budget_hash = budget_dataframe_to_hash(json_budget_df) budget_total = 0 funds_spent = 0 for category in category_budget_hash: budget_total += category_budget_hash[category] funds_spent += sum_of_category_expense_in_month(user_df, category, yearMonth) funds_spent = round(funds_spent, 2) budget_total = round(budget_total, 2) year, month = yearMonth.split("-") year = int(year) month_abbr = calendar.month_abbr[int(month)] balance = budget_total - funds_spent balance_color = (GREEN_COLOR if budget_total - funds_spent > 0 else RED_COLOR) progress_percent = 100 * (funds_spent / budget_total) if progress_percent <= 90: progress_color = "success" elif progress_percent > 90 and progress_percent < 100: progress_color = "warning" else: progress_color = "danger" balance = round(balance, 2) progress_percent = round(progress_percent, 1) balance_text = None if balance >= 0: balance_text = "$" + str(balance) else: balance_text = "-$" + str(balance)[1:] output = [ html.H4(f"Budget Metrics"), html.P( f"For {month_abbr}, {year}", className="subtitle_style", ), html.P( [html.Span("Budget Total:"), html.Span("$" + str(budget_total), className="floatRightStyle")], ), html.P( [html.Span("Funds Spent:"), html.Span("$" + str(funds_spent), className="floatRightStyle")], ), html.P([html.Span("Remaining: "), html.Span( balance_text, style={ "color": balance_color, "font-weight": 900, "float": "right", } ) ]), dbc.Progress( str(progress_percent)+"%", value=progress_percent, color=progress_color, ) ] return output
], className="form-group shadow-textarea" ), html.H5( 'Sentiment analysis 🤖' ), dbc.Progress( children=html.Span( id='proba', style={ 'color': 'black', 'fontWeight': 'bold' } ), id="progress", striped=False, animated=False, style={ 'marginBottom': '10px' } ), html.H5( 'Propose a rating 😁📢' ), html.Div( [ dcc.Slider(
]) ] # define layout layout = html.Div([ dbc.Container( className='center', children=[ dbc.Row(children=[ dbc.Col(className='center', children=[ html.H1( children='Introduction to linear regression') ]) ]), dbc.Progress(value=100, style={"height": "2px"}, className="mb-3"), dbc.Row(children=[ dbc.Col(dbc.Card( color="dark", className="mb-4", children=[ dbc.CardHeader("Settings"), dbc.CardBody([ dbc.Row(children=[ dbc.Col( html.H6(children=[ 'Order of the ground-truth function' ]), ) ]), dbc.Row(children=[ dbc.Col(
import dash import dash_bootstrap_components as dbc from dash.dependencies import Input, Output, State import dash_core_components as dcc import dash_html_components as html import dash_table progress = html.Div( children=[ dcc.Interval(id="progress-interval", n_intervals=0, interval=500), dbc.Progress(id="progress"), ], style={ 'margin': '10px', 'width': '100%', } ) file_upload = html.Div([ dcc.Upload( id='upload-data', children=html.Div([ 'Drag and Drop or ', html.A('Select Files') ]), style={ 'width': '100%', 'height': '60px', 'lineHeight': '60px', 'borderWidth': '1px', 'borderStyle': 'dashed',
import dash_bootstrap_components as dbc progress = dbc.Progress("25%", value=25)
import dash import dash_bootstrap_components as dbc import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State app = dash.Dash(external_stylesheets=[dbc.themes.BOOTSTRAP]) app.layout = dbc.Container([ dbc.Progress(value=50), html.Br(), dbc.Progress('25%', value=25), html.Br(), html.Div([ dbc.Progress(value=50, style={"height": "1px"}, className="mb-3"), dbc.Progress(value=50, style={"height": "30px"}), ]), html.Br(), dbc.Progress(value=25, color="success", className="mb-3"), dbc.Progress(value=50, color="warning", className="mb-3"), dbc.Progress(value=75, color="danger", className="mb-3"), dbc.Progress(value=100, color="info", className='mb-3'), dbc.Progress( [ dbc.Progress(value=20, color="success", bar=True), dbc.Progress(value=30, color="warning", bar=True), dbc.Progress(value=20, color="danger", bar=True), ], multi=True, ),
html.P("Select number of cores:", style={ 'display': 'inline-block', 'margin-top': 30 }), html.Div(dcc.Slider(id='n_cpus', min=1, max=n_cpus, step=1, value=n_cpus, marks={i: f'{i} cpus' for i in [1, n_cpus]}), style=slider_style), html.Button('Run', id='run', style=button_style), dcc.Interval(id="progress-interval", n_intervals=0, interval=1000), dbc.Progress(id="progress-bar", value=50), html.Div(id='progress', children=[], style=info_style), html.H2("Table View", style={'margin-top': 100}), dcc.Dropdown(id='table-value-select', options=[{ 'label': i, 'value': i } for i in [ 'peakArea', 'rt_max_intensity', 'intensity_median', 'intensity_max', 'intensity_min' ]], value='peakArea'), html.Div(id='run-out', style={ 'min-height': 0, 'margin-top': 10
"Common signs of infection include respiratory symptoms,fever,cough,shortness of breath and breathing difficulties. " "In more severe cases, " "infection can cause pneumonia, severe acute respiratory syndrome, kidney failure and even death.", className="card-text", ), ], style={'textAlign': 'center'}) ]), dbc.Card([ html.Br(), html.Br(), dbc.Row([ dbc.Col([ dbc.Card([ dbc.Progress(value=98, striped=True, animated=True, color="danger"), html.H5("Fever", className="card-footer"), html.H6("98%"), ]), ], lg=6), dbc.Col([ dbc.Card([ dbc.Progress(value=76, striped=True, animated=True, color="warning"), html.H5("Cough", className="card-footer"), html.H6("75%"), ]),
), html.H4('Peak previews'), html.Button('Update peak previews', id='pko-peak-preview'), html.Button('Regenerate all figures', id='pko-peak-preview-from-scratch'), html.Div(id='pko-peak-preview-images', style={ "maxHeight": "630px", "overflowX": "scroll", 'padding': 'auto' }), dcc.Markdown('---'), html.Div(id='pko-controls'), dcc.Dropdown(id='pko-dropdown', options=[], value=None), dbc.Progress(id="pko-progress-bar", value=0, style={ 'marginBottom': '20px', 'width': '100%' }), dcc.Loading(dcc.Graph('pko-figure')), dcc.Checklist(id='pko-figure-options', options=[{ 'value': 'log', 'label': 'Logarithmic y-scale' }], value=[]), html.Button('Set RT to current view', id='pko-set-rt'), html.Button('Find largest peak', id='pko-find-largest-peak'), html.Button('Confirm retention time', id='pko-confirm-rt'), html.Button('Remove Peak', id='pko-delete', style={'float': 'right'}), html.Div(id='pko-image-clicked'), html.Div(children=[
import dash_bootstrap_components as dbc progress = dbc.Progress( [ dbc.Progress(value=20, color="success", bar=True), dbc.Progress(value=30, color="warning", bar=True), dbc.Progress(value=20, color="danger", bar=True), ], multi=True, )
# spinner_style={"width": "10rem", "height": "10rem"}), # spinnerClassName="spinner"), # dcc.Loading(children=[dcc.Graph(id="loading-output")], color="#119DFF", type="dot", fullscreen=True,), width={'size': 12, 'offset': 0}), ), dbc.Row([ dbc.Col(dbc.Input(id="passenger_count", type="number", min=1, max=6, step=1, value=1), width={'size': 2, 'offset': 1}), dbc.Col(dbc.Button(id="loading-button", n_clicks=0, children=["Passengers"]), width={'size': 1, 'offset': 0}) ], no_gutters=True), html.Br(), dbc.Row(dbc.Col(dbc.Progress(children=["25%"], value=25, max=100, striped=True, color="success", style={"height": "20px"}), width={'size': 5, 'offset': 1}), ), ] ) @app.callback( Output("loading-output", "figure"), [Input("loading-button", "n_clicks")], [State("passenger_count", "value")] ) def load_output(n_clicks, psg_num): if n_clicks: dff = df[df["passenger_count"] == psg_num] fig = px.histogram(dff, x="total_amount", title="NYC Green Taxi Rides").update_layout(title_x=0.5) return fig
className='four columns div-for-charts bg-grey', children=[ html.H3('Output Console:'), html.Div(id='output-HLA-data-upload'), html.Div(id='output-MFI-data-upload'), html.Div(id='output-state'), # Hidden div inside the app that stores the intermediate value html.Div(id='hidden-MFI-data', style={'display': 'none'}), html.Div(id='hidden-HLA-data', style={'display': 'none'}), html.Div(id='hidden-Results', style={'display': 'none'}), # progress bar dbc.Progress(id="progress", value=0, striped=True, animated=True), # Download the results in csv File html.H2("Download Results"), html.Div([ html.Button("Download", id="download-buttion"), Download(id="download"), ]), ]), # Right Section html.Div( className='four columns div-for-about', children=[ html.H3('About'), html. P('The luminex data only takes into account the DP locus'
def _create_layout(app, dest_folder: 'Path', function_UIs: dict): """Prepares the UI layout. :param app: the current Dash application :type app: dash.Dash :param dest_folder: the destination folder for the datasets :type dest_folder: PurePath :param function_UIs: dataset generator UIs :type function_UIs: dict :return: the updated Dash application :rtype: dash.Dash """ app.layout = html.Div( children=[ dcc.Interval(id='progress-interval', n_intervals=0, interval=750), # For empty output callbacks html.Div(id='hidden-div', style={'display': "none"}), html.Div(children=[ dbc.Toast( "", id="dataset-prepare-info-alert", header="Dataset prepare", icon="info", is_open=False, duration=2000, style={ "position": "fixed", "top": 8, "right": 8, "width": 480 }, ), dbc.Toast( "", id="dataset-inspect-info-alert", header="Dataset inpsect", icon="success", is_open=False, duration=2000, style={ "position": "fixed", "top": 8, "right": 8, "width": 480 }, ), dbc.Toast( "", id="dataset-generator-info-alert", header="Dataset save", icon="success", is_open=False, duration=2000, style={ "position": "fixed", "top": 8, "right": 8, "width": 480 }, ), ]), html.H2(children='Dataset Generator'), html.Hr(), dbc.Row([ dbc.Col(html.H3(children="Output folder"), width={ 'size': "auto", 'offset': 1 }), dbc.Col(dcc.Input( id='dest-folder', type="text", placeholder="destination folder name", value=dest_folder.name, ), width="auto"), dbc.Col(dbc.Button('Load files', id='load-files'), width={'size': "auto"}), dbc.Col(dbc.Spinner(html.H5(id='dest-folder-load', children="")), width={'size': "auto"}), ]), html.Hr(), html.H3(children="Generator Parameters"), html.Hr(), dbc.Row([ dbc.Col(html.H5(id='seed-val', children="Seed: "), width={ 'size': 3, 'offset': 1 }), dbc.Col(dcc.Input( id='seed', type="number", placeholder="random seed value", value=_DEFAULT_SEED, ), width="auto") ], style={'padding-bottom': "1em"}), dbc.Row([ dbc.Col(html.H5(id='num-day-val', children="Num. Days: "), width={ 'size': 3, 'offset': 1 }), dbc.Col(dcc.Slider( id='num-days', min=1, max=365, step=1, value=7, marks={ 0: { 'label': '0' }, 7: { 'label': '7' }, 30: { 'label': '30' }, 60: { 'label': '60' }, 90: { 'label': '90' }, 120: { 'label': '120' }, 365: { 'label': '365' } }, ), width=7) ]), dbc.Row([ dbc.Col(html.H5(id='num-req-x-day-val', children="Num. Req. x Day: "), width={ 'size': 3, 'offset': 1 }), dbc.Col(dcc.Slider( id='num-req-x-day', min=1, max=100000, step=1, value=1000, marks={ 1000: { 'label': '1000' }, 10000: { 'label': '10000' }, 20000: { 'label': '20000' }, 30000: { 'label': '30000' }, 50000: { 'label': '50000' }, 100000: { 'label': '100000' }, }, ), width=7) ]), html.Hr(), html.H4(children="Function Selection"), dbc.Row([ dbc.Col(dbc.Spinner( dcc.Dropdown(id='functions', options=get_functions(), value='None')), width={ 'size': 7, 'offset': 1 }), dbc.Col( dbc.Button( "Reload functions", id='reload-functions', color="primary", ), ), ]), html.Hr(), html.H4(children="Function Parameters"), html.Div(id='function-parameters'), html.Hr(), dbc.Button("Prepare", id='prepare-dataset', color="warning", block=True), dbc.Button("Inpsect", id='inspect-dataset', color="info", block=True), dbc.Button("Save", id='save-dataset', color="success", block=True), html.Hr(), dbc.Progress(id='create-dataset-progress', value=_PROGRESS, className="mb-3"), html.Hr(), dbc.Spinner(html.Div(id='inspect-output')), ], style={'padding': "1em"}) return app
import dash_bootstrap_components as dbc progress = dbc.Progress(value=50)
id="begin-button", n_clicks=0, style=BUTTON_DEFAULT_STYLE), ], style={"textAlign": "center"}), html.H3("Current Output"), html.Div(id="current-output-container", children=[ html.Ul(id="output-list", children=[html.Li("No files yet.")]) ]), html.Div(id='page-content'), html.H6('Progress bar'), dbc.Progress(id="progress", value=10, striped=True, animated=True, style={"height": "30px"}, className="mb-3", color="success"), html.Div([ html.Button(id='stop-server', children="ShutDown Server", n_clicks=0) ], style={ "width": "50%", "display": "inline-block" }), html.P(id='placeholder') ]) @app.server.route("/outputs/<path:path>")