cikode / app.py
adride00
Enhance app.py by adding a detailed description to the Gradio chat interface and refining the answer function to accept message history. The updated implementation improves user interaction by providing context for questions related to automation and ecommerce.
3ba80aa
raw
history blame
523 Bytes
# app.py – versión 100 % funcional
import gradio as gr
import random
import datetime
def answer(message: str, history: list):
"""Devuelve un saludo simple con la fecha actual."""
return f"({datetime.date.today()}) Gracias por tu pregunta. {random.choice(['¡Claro!', 'Por supuesto!'])}"
demo = gr.ChatInterface(
fn=answer,
title="IA de Cikode",
description="Haz cualquier pregunta sobre automatización o ecommerce."
)
demo.queue(concurrency_count=1).launch() # la cola evita errores bajo carga