pamunarr commited on
Commit
4768faa
·
verified ·
1 Parent(s): 8ffdf69

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -81,4 +81,10 @@ def clasifica(Image, Types, Classes):
81
  probs = clf.predict(PIL.Image.fromarray(Image))[-1]
82
  return {textos[i]: probs[i] for i in range(len(textos))}
83
 
84
- gr.Interface(fn=clasifica, inputs=["image", "text", "text"], outputs=gr.components.Label()).launch(share=False)
 
 
 
 
 
 
 
81
  probs = clf.predict(PIL.Image.fromarray(Image))[-1]
82
  return {textos[i]: probs[i] for i in range(len(textos))}
83
 
84
+ gr.Interface(fn=clasifica,
85
+ inputs=["image", "text", "text"],
86
+ outputs=gr.components.Label(),
87
+ examples=[
88
+ ['caballo.jpg', "photo", "tiger, zebra, horse, bear"],
89
+ ['drawing.jpg', "picture, drawing, photo", "sunset, sunset, sunset"]
90
+ ]).launch(share=False)