Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -56,9 +56,10 @@ def predict_image(image):
|
|
56 |
|
57 |
image_gradio_app = gr.Interface(
|
58 |
fn=predict_image,
|
59 |
-
inputs=gr.Image(label="
|
60 |
-
outputs=[gr.Label(label="
|
61 |
title=custom_title,
|
|
|
62 |
theme=theme
|
63 |
)
|
64 |
|
@@ -69,7 +70,9 @@ def echo(message, history):
|
|
69 |
chatbot_gradio_app = gr.ChatInterface(
|
70 |
fn=echo,
|
71 |
title=custom_title,
|
72 |
-
|
|
|
|
|
73 |
)
|
74 |
|
75 |
banner_tab_content = """
|
@@ -80,8 +83,8 @@ banner_tab_content = """
|
|
80 |
<p style="font-size: 16px; color: #4e6339; text-align: justify;">Nuestra plataforma combina la potencia de la inteligencia artificial con la comodidad de un chatbot para brindarte respuestas rápidas y precisas sobre qué objetos son reciclables y cómo hacerlo de la manera más eficiente.</p>
|
81 |
<p style="font-size: 16px; text-align:center;"><strong><span style="color: #4e6339;">¿Cómo usarlo?</span></strong>
|
82 |
<ul style="list-style-type: disc; text-align: justify; margin-top: 20px; padding-left: 20px;">
|
83 |
-
<li style="font-size: 16px; color: #4e6339;"><strong><span style="color: #4e6339;">Green Greta Image Classification:</span></strong> Ve a la pestaña Greta
|
84 |
-
<li style="font-size: 16px; color: #4e6339;"><strong><span style="color: #4e6339;">Green Greta Chat:</span></strong> ¿Tienes preguntas sobre reciclaje, materiales específicos o prácticas sostenibles? ¡Pregunta a nuestro chatbot en la pestaña Green Greta Chat!📝 Está aquí para responder todas tus preguntas y ayudarte a tomar decisiones más informadas sobre tu reciclaje.</li>
|
85 |
</ul>
|
86 |
</div>
|
87 |
"""
|
@@ -91,7 +94,7 @@ banner_tab = gr.Markdown(banner_tab_content)
|
|
91 |
# Combine interfaces into a single app
|
92 |
app = gr.TabbedInterface(
|
93 |
[banner_tab, image_gradio_app, chatbot_gradio_app],
|
94 |
-
tab_names=["
|
95 |
theme=theme
|
96 |
)
|
97 |
|
|
|
56 |
|
57 |
image_gradio_app = gr.Interface(
|
58 |
fn=predict_image,
|
59 |
+
inputs=gr.Image(label="Imágen", sources=['upload', 'webcam'], type="pil"),
|
60 |
+
outputs=[gr.Label(label="Clasificación")],
|
61 |
title=custom_title,
|
62 |
+
description="Carga una foto del objeto que quieras reciclar, y Green Greta identificará de qué se trata para que puedas desecharlo adecuadamente.",
|
63 |
theme=theme
|
64 |
)
|
65 |
|
|
|
70 |
chatbot_gradio_app = gr.ChatInterface(
|
71 |
fn=echo,
|
72 |
title=custom_title,
|
73 |
+
description="Green Greta ChatBot está aquí para responder todas tus preguntas y ayudarte a tomar decisiones más informadas sobre tu reciclaje.",
|
74 |
+
theme=theme,
|
75 |
+
|
76 |
)
|
77 |
|
78 |
banner_tab_content = """
|
|
|
83 |
<p style="font-size: 16px; color: #4e6339; text-align: justify;">Nuestra plataforma combina la potencia de la inteligencia artificial con la comodidad de un chatbot para brindarte respuestas rápidas y precisas sobre qué objetos son reciclables y cómo hacerlo de la manera más eficiente.</p>
|
84 |
<p style="font-size: 16px; text-align:center;"><strong><span style="color: #4e6339;">¿Cómo usarlo?</span></strong>
|
85 |
<ul style="list-style-type: disc; text-align: justify; margin-top: 20px; padding-left: 20px;">
|
86 |
+
<li style="font-size: 16px; color: #4e6339;"><strong><span style="color: #4e6339;">Green Greta Image Classification:</span></strong> Ve a la pestaña "Green Greta - Clasificador de Imágenes" y simplemente carga una foto del objeto que quieras reciclar, y nuestro modelo de identificará de qué se trata🕵️♂️ para que puedas desecharlo adecuadamente.</li>
|
87 |
+
<li style="font-size: 16px; color: #4e6339;"><strong><span style="color: #4e6339;">Green Greta Chat:</span></strong> ¿Tienes preguntas sobre reciclaje, materiales específicos o prácticas sostenibles? ¡Pregunta a nuestro chatbot en la pestaña "Green Greta - Chat"!📝 Está aquí para responder todas tus preguntas y ayudarte a tomar decisiones más informadas sobre tu reciclaje.</li>
|
88 |
</ul>
|
89 |
</div>
|
90 |
"""
|
|
|
94 |
# Combine interfaces into a single app
|
95 |
app = gr.TabbedInterface(
|
96 |
[banner_tab, image_gradio_app, chatbot_gradio_app],
|
97 |
+
tab_names=["Bienvenido a Green Greta", "Green Greta - Clasificador de Imágenes", "Green Greta - Chat"],
|
98 |
theme=theme
|
99 |
)
|
100 |
|