Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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(
|
| 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)
|