dnth commited on
Commit
3e1e5af
·
verified ·
1 Parent(s): 16237f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -41,12 +41,16 @@ def predict(img):
41
  return results
42
 
43
 
 
 
 
44
  iface = gr.Interface(
45
  fn=predict,
46
  inputs=gr.Image(type="pil"),
47
  outputs=gr.Label(num_top_classes=5),
48
  title="Image Classification with ONNX TensorRT",
49
  description="Upload an image to classify it using the ONNX TensorRT model.",
 
50
  )
51
 
52
  if __name__ == "__main__":
 
41
  return results
42
 
43
 
44
+ # Add an example image
45
+ example_image = "beignets-task-guide.png"
46
+
47
  iface = gr.Interface(
48
  fn=predict,
49
  inputs=gr.Image(type="pil"),
50
  outputs=gr.Label(num_top_classes=5),
51
  title="Image Classification with ONNX TensorRT",
52
  description="Upload an image to classify it using the ONNX TensorRT model.",
53
+ examples=[example_image], # Add the example image to the interface
54
  )
55
 
56
  if __name__ == "__main__":