Rageshhf commited on
Commit
875b311
1 Parent(s): 970ac58

add examples

Browse files
app.py CHANGED
@@ -31,7 +31,7 @@ def predict(image):
31
  predicted_class_idx = logits.argmax(-1).item()
32
  return(model.config.id2label[predicted_class_idx])
33
 
34
- demo = gr.Interface(fn=predict, inputs="image", outputs="text", title=title,
35
  description=description,).launch()
36
 
37
  # demo.launch(debug=True)
 
31
  predicted_class_idx = logits.argmax(-1).item()
32
  return(model.config.id2label[predicted_class_idx])
33
 
34
+ demo = gr.Interface(fn=predict, inputs="image", outputs="text", title=title, examples=["examples/image_1.png", "examples/image_2.png", "examples/image_3.png"],
35
  description=description,).launch()
36
 
37
  # demo.launch(debug=True)
examples/image_1.png ADDED
examples/image_2.png ADDED
examples/image_3.png ADDED