mgspl commited on
Commit
7c17e4d
1 Parent(s): 7a5d75a

Update app.py

Browse files

adding examples & description

Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -86,8 +86,11 @@ def wrapper_fn(input_image):
86
  return predict(input_image, withGradio=True)
87
 
88
  # Define Gradio interface
 
 
 
89
  output = gr.Textbox(label="Output prediction")
90
- app = gr.Interface(fn=wrapper_fn, inputs=gr.Image(), outputs=output)
91
 
92
  # Launch the app
93
  app.launch()
 
86
  return predict(input_image, withGradio=True)
87
 
88
  # Define Gradio interface
89
+ title = "MNIST - understanding the basis"
90
+ description = "I have created and trained a custom neural network for MNIST. The score of `valid loss 0.126034` isn't the optimal one but it is reasonably acceptable. This is an exercise project where I only allowed myself a limited time to improve the result. You need to use same size image as the model 28x28, white text on black for best results."
91
+ examples = ['data/0-custom-invert.jpg', 'data/0.jpg', 'data/2.jpg', 'data/3.jpg', 'data/5.jpg', 'data/9.jpg', 'data/0-custom.jpg',]
92
  output = gr.Textbox(label="Output prediction")
93
+ app = gr.Interface(fn=wrapper_fn, inputs=gr.Image(), outputs=output, title=title,description=description,examples=examples)
94
 
95
  # Launch the app
96
  app.launch()