pamunarr commited on
Commit
5687849
·
verified ·
1 Parent(s): 89bd32e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ def clasifica(Image, Types, Classes):
78
  if len(tipos) == 1:
79
  tipos = tipos[0]
80
  textos = clf.set_classes(clases, tipos)
81
- probs = clf.predict(PIL.Image.fromarray(imagen))[-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)
 
78
  if len(tipos) == 1:
79
  tipos = tipos[0]
80
  textos = clf.set_classes(clases, tipos)
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)