This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@app.callback(Output('km-travelled-gauge', 'value'), Input('km-travelled-slider', 'value')) | |
def km_travelled_update(km_travelled): | |
return km_travelled | |
@app.callback(Output('km-per-liters-slider-output', 'value'), Input('km-per-liters-slider', 'value')) | |
def km_travelled_update(km_per_lit): | |
return km_per_lit | |
@app.callback(Output('engine-size-slider-output', 'value'), Input('engine-size-slider', 'value')) | |
def km_travelled_update(engine_slider): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# utils2.py | |
import pandas as pd | |
import dash_bootstrap_components as dbc | |
import dash_daq as daq | |
df = pd.read_csv('car_price_data.csv').drop('Unnamed: 0', axis=1) | |
card_content = [] | |
row5 = dbc.Row([ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
row1 = dbc.Row(dbc.Col(html.Div("A single column"))) | |
row2 = dbc.Row( | |
[ | |
dbc.Col(html.Div("One of three columns")), | |
dbc.Col(html.Div("One of three columns")), | |
dbc.Col(html.Div("One of three columns")), | |
] | |
) | |
import dash_bootstrap_components as dbc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dash_bootstrap_components as dbc | |
from dash import html | |
app = JupyterDash(__name__, external_stylesheets = [dbc.themes.BOOTSTRAP]) | |
app.layout = html.Div( | |
[ | |
dbc.Row(dbc.Col(html.Div("A single column"))), | |
dbc.Row( | |
[ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
import joblib | |
loaded_model = joblib.load('final_car_prediction_model.pkl') | |
app = JupyterDash(__name__) | |
app.layout = html.Div([ | |
html.H2('km-travelled'), | |
dcc.Slider( | |
min=df['km_traveled'].min(), | |
max=df['km_traveled'].max(), | |
value=100.0, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = JupyterDash(__name__) | |
from datetime import date | |
app.layout = html.Div([ | |
html.H2('km-travelled'), | |
dcc.Slider( | |
min=df['km_traveled'].min(), | |
max=df['km_traveled'].max(), | |
value=100.0, | |
id='km-travelled-slider', | |
tooltip={"placement": "bottom"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = JupyterDash(__name__) | |
from datetime import date | |
app.layout = html.Div([ | |
html.H2('km-travelled'), | |
dcc.Slider( | |
min=df['km_traveled'].min(), | |
max=df['km_traveled'].max(), | |
value=100.0, | |
id='km-travelled-slider' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import date | |
app = JupyterDash(__name__) | |
app.layout = html.Div([ | |
dcc.Slider( | |
min=df['km_traveled'].min(), | |
max=df['km_traveled'].max(), | |
value=df['km_traveled'].min(), | |
id='km-travelled-slider' | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = JupyterDash(__name__) | |
from datetime import date | |
app.layout = html.Div([ | |
dcc.Slider( | |
min=df['km_traveled'].min(), | |
max=df['km_traveled'].max(), | |
value=100.0, | |
id='km-travelled-slider' | |
), | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app = JupyterDash(__name__) | |
app.layout = html.Div([ | |
dcc.Slider( | |
min = df['km_traveled'].min(), | |
max = df['km_traveled'].max(), | |
value = 100.0, | |
id = 'km-travelled-slider' | |
), | |
html.Div(id = 'slider-output-container') |