paloma99 commited on
Commit
db48f90
·
verified ·
1 Parent(s): c9e5cb3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -53,13 +53,14 @@ def predict_image(image):
53
  predictions = pipeline(image)
54
  return {p["label"]: p["score"] for p in predictions}
55
 
 
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
  submit_btn="Cargar",
65
  clear_btn="Borrar",
@@ -69,13 +70,14 @@ image_gradio_app = gr.Interface(
69
  def echo(message, history):
70
  return message
71
 
 
72
 
73
  chatbot_gradio_app = gr.ChatInterface(
74
  fn=echo,
75
  chatbot=gr.Chatbot(height=400),
76
  textbox=gr.Textbox(placeholder="Hazme una pregunta sobre reciclaje...", scale=7),
77
  title=custom_title,
78
- description="Green Greta ChatBot está aquí para responder todas tus preguntas y ayudarte a tomar decisiones más informadas sobre tu reciclaje.",
79
  examples=["Hola, ¿cuál es tu nombre?", "¿Qué puedo hacer con ropa que ya no uso?", "¿Qué recursos educativos existen para aprender mas sobre sostenibilidad?"],
80
  theme=theme,
81
  fill_height=True,
 
53
  predictions = pipeline(image)
54
  return {p["label"]: p["score"] for p in predictions}
55
 
56
+ custom_desc_img = "<span style='font-size: 16px; color: rgb(243, 239, 224);'>Carga una foto del objeto que quieras reciclar y Green Greta identificará de qué se trata para que puedas desecharlo adecuadamente.</span>"
57
 
58
  image_gradio_app = gr.Interface(
59
  fn=predict_image,
60
  inputs=gr.Image(label="Imágen", sources=['upload', 'webcam'], type="pil"),
61
  outputs=[gr.Label(label="Clasificación")],
62
  title=custom_title,
63
+ description=custom_desc_img,
64
  theme=theme,
65
  submit_btn="Cargar",
66
  clear_btn="Borrar",
 
70
  def echo(message, history):
71
  return message
72
 
73
+ custom_desc_chat = "<span style='font-size: 16px; color: rgb(243, 239, 224);'>Green Greta ChatBot está aquí para responder todas tus preguntas y ayudarte a tomar decisiones más informadas sobre tu reciclaje.</span>"
74
 
75
  chatbot_gradio_app = gr.ChatInterface(
76
  fn=echo,
77
  chatbot=gr.Chatbot(height=400),
78
  textbox=gr.Textbox(placeholder="Hazme una pregunta sobre reciclaje...", scale=7),
79
  title=custom_title,
80
+ description=custom_desc_chat,
81
  examples=["Hola, ¿cuál es tu nombre?", "¿Qué puedo hacer con ropa que ya no uso?", "¿Qué recursos educativos existen para aprender mas sobre sostenibilidad?"],
82
  theme=theme,
83
  fill_height=True,