pamunarr commited on
Commit
01fc1c2
·
verified ·
1 Parent(s): 5bf3fbe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -78,7 +78,7 @@ def clasifica(imagen, clases_, tipos_):
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][0]
82
  return {textos[i]: probs[i] for i in range(len(textos))}
83
 
84
  gr.Interface(fn=clasifica, inputs=["image", "text", "text"], outputs="text").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(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="text").launch(share=False)