FelipeMena commited on
Commit
f8bfd70
·
verified ·
1 Parent(s): 154e19f

Cambio en la interfaz

Browse files
Files changed (1) hide show
  1. app.py +10 -5
app.py CHANGED
@@ -66,11 +66,16 @@ def chat_biblioteca(pregunta):
66
 
67
  # --- Interfaz Gradio ---
68
  iface = gr.Interface(
69
- fn=chat_biblioteca,
70
- inputs=gr.Textbox(label="Haz tu pregunta", placeholder="¿Cuál es el horario de la biblioteca?"),
71
- outputs=gr.Textbox(label="Respuesta del BiblioBot"),
72
- title="📚 BiblioBot - Asistente Virtual de Biblioteca",
73
- description="Pregúntame sobre horarios, servicios, préstamos, normas o actividades de la biblioteca universitaria. Estoy aquí para ayudarte."
 
 
 
 
 
74
  )
75
 
76
  iface.launch()
 
66
 
67
  # --- Interfaz Gradio ---
68
  iface = gr.Interface(
69
+ # --- Interfaz tipo chat oscuro ---
70
+ gr.ChatInterface(
71
+ fn=responder,
72
+ title="📚 BiblioBot",
73
+ description="¡Bienvenido a BiblioBot! Pregunta sobre libros, horarios o servicios de biblioteca.",
74
+ theme="soft",
75
+ examples=["¿Cuál es el horario?", "¿Puedo comer en la biblioteca?", "¿Qué pasa si pierdo un libro?"],
76
+ retry_btn="Reintentar",
77
+ clear_btn="Borrar historial",
78
+ ).launch()
79
  )
80
 
81
  iface.launch()