Spaces:
Runtime error
Runtime error
mrolando
commited on
Commit
·
b16e0f5
1
Parent(s):
4956dc2
added examples
Browse files- app.py +2 -1
- palacio.jpeg +0 -0
app.py
CHANGED
@@ -6,7 +6,7 @@ import gradio as gr
|
|
6 |
from transformers import pipeline
|
7 |
|
8 |
import base64
|
9 |
-
|
10 |
with open("Iso_Logotipo_Ceibal.png", "rb") as image_file:
|
11 |
encoded_image = base64.b64encode(image_file.read()).decode()
|
12 |
|
@@ -43,6 +43,7 @@ with gr.Blocks() as demo:
|
|
43 |
with gr.Column():
|
44 |
inputt = gr.Image(type="pil", label="Ingresá la imagen a clasificar.")
|
45 |
button = gr.Button(value="Clasificar")
|
|
|
46 |
with gr.Column():
|
47 |
output = gr.Label()
|
48 |
button.click(clasificador,inputt,output)
|
|
|
6 |
from transformers import pipeline
|
7 |
|
8 |
import base64
|
9 |
+
import os
|
10 |
with open("Iso_Logotipo_Ceibal.png", "rb") as image_file:
|
11 |
encoded_image = base64.b64encode(image_file.read()).decode()
|
12 |
|
|
|
43 |
with gr.Column():
|
44 |
inputt = gr.Image(type="pil", label="Ingresá la imagen a clasificar.")
|
45 |
button = gr.Button(value="Clasificar")
|
46 |
+
examples = gr.Examples(examples=[os.path.join(os.path.dirname(__file__), "palacio.jpeg")],inputs=[inputt])
|
47 |
with gr.Column():
|
48 |
output = gr.Label()
|
49 |
button.click(clasificador,inputt,output)
|
palacio.jpeg
ADDED