TicioProd / app.py
Ticio's picture
Update app.py
55b1ed1 verified
raw
history blame
930 Bytes
import gradio as gr
from inference import inference
import os
theme = theme = gr.themes.Soft(
primary_hue="red",
secondary_hue="red",
)
salute = f"""
👋 ¡Bienvenido a Ticio!
Ten en cuenta que la primera respuesta en cada chat puede tardar unos 30 segundos.
Recuerda no pedir fallos específicos, sino más bien temas o áreas.
Para más información sobre cómo sacarle el mejor provecho a Ticio, lee este artículo: {os.environ['link']}
"""
with gr.Blocks(theme = theme) as demo:
chatbot = gr.Chatbot(type="messages",
value=[{"role": "assistant", "content": salute}]
)
hidden_text = gr.Textbox(visible = False) # Added hidden text component
gr.ChatInterface(fn=inference, chatbot=chatbot, type="messages", additional_inputs= hidden_text, additional_outputs= hidden_text, save_history= True, show_api= False).render()
demo.launch()