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