MCPcopy Create free account
hub / github.com/alpha2phi/python-apps / update_output

Function update_output

sagemaker-serverless/test_inference_dash.py:48–58  ·  view source on GitHub ↗
(contents)

Source from the content-addressed store, hash-verified

46
47@app.callback(Output('output', 'children'), [Input('upload', 'contents')])
48def update_output(contents):
49 if contents is not None:
50 content_type, content_string = contents.split(',')
51 if 'image' in content_type:
52 predictions = predict(contents)
53 return html.Div([
54 html.Div('Predictions'),
55 html.Pre(predictions, style=pre_style),
56 html.Hr(),
57 html.Img(src=contents)
58 ])
59
60
61if __name__ == '__main__':

Callers

nothing calls this directly

Calls 1

predictFunction · 0.85

Tested by

no test coverage detected