-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathapp.py
37 lines (34 loc) · 1014 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import callbacks
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
app.title = 'Sticker Creator'
server = app.server
app.config.suppress_callback_exceptions = True
app.layout = html.Div([
# represents the URL bar, doesn't render anything
dcc.Location(id='url', refresh=False),
# Heading
html.H1("Sticker Creator", id="heading"),
# Text box
dcc.Input(
id="meme-text",
type="text",
placeholder="Enter meme text"
),
# File Upload
dcc.Upload(
id='upload-image',
children=html.Div([
'Drag and Drop or ',
html.U('Click Here')
]),
# Allow multiple files to be uploaded
multiple=False
),
html.Div(id="filename"),
html.Button(id='submit-button', n_clicks=0, children='Stickerify'),
html.Div(id='output-image-upload'),
])