Skip to content

Instantly share code, notes, and snippets.

@IvanNardini
Created June 7, 2020 13:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IvanNardini/e4b158528f7ea24ff1742d2ad2b3e4d3 to your computer and use it in GitHub Desktop.
Save IvanNardini/e4b158528f7ea24ff1742d2ad2b3e4d3 to your computer and use it in GitHub Desktop.
MLOps series #2 : Deploy a Recommendation System as Hosted Interactive Web Service on AWS
'''
This module contains the layout of the application
'''
import dash_table
import dash_core_components as component
import dash_html_components as html
#Customerid Input
c_id_component = component.Input(id="uid",
type="text",
placeholder='100')
c_id_div = html.Div(id='customerid', children=[html.H6("Please enter your customer ID : "),
c_id_component,
html.Br()],
className="two columns")
#Prediction Output
predictions = dash_table.DataTable(id='table',
css=[{'selector': 'table', 'rule': 'table-layout: fixed'}],
style_as_list_view=True,
style_cell={'width': '30%', 'textAlign': 'left'},
style_header={'backgroundColor': 'white', 'fontWeight': 'bold'})
predictions_div = html.Div(id='predictions',
children=[html.H6(children='Products Recommended'),
predictions],
style={'width': '25%'},
className="ten columns")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment