Spaces:
Sleeping
Sleeping
import gradio as gr | |
from tools import ask_chatbot | |
def check_inputs(question): | |
if(question !="" ): | |
respuesta = ask_chatbot(question) | |
return respuesta | |
else: | |
return '!Ups, hubo un Error! - Nos hace falta mas cerveza para poder ayudarte', None | |
# Descripci贸n del Header | |
description = """ | |
<center><h1><b><img src="https://imgs.search.brave.com/FOs8wNNOrQRHfIJKL6DWejiq9hf8c8LhnE66Bf-UoQQ/rs:fit:560:320:1/g:ce/aHR0cHM6Ly91cGxv/YWQud2lraW1lZGlh/Lm9yZy93aWtpcGVk/aWEvY29tbW9ucy90/aHVtYi85Lzk4L1Ro/ZV9TaW1wc29uc195/ZWxsb3dfbG9nby5z/dmcvNTEycHgtVGhl/X1NpbXBzb25zX3ll/bGxvd19sb2dvLnN2/Zy5wbmc" alt="THE SIMPSONS"></b></h1> | |
<center><h2><b>Todo sobre los simpsons </b></h2> | |
Realiza preguntas sobre situaciones de la vida que sucedieron en Los Simpsons | |
</center> | |
""" | |
# Descripci贸n del Footer | |
article = """ | |
<br> | |
<b></b> | |
<br><b></b> | |
<br> | |
""" | |
# Inputs | |
question = gr.Textbox(label="Ingrese su pregunta aqui") | |
# Outputs | |
resultado = gr.Textbox(label="Respuesta") | |
gui = gr.Interface( | |
fn=check_inputs, | |
inputs=[question], | |
outputs=[resultado], | |
description = description, | |
article = article, | |
theme=gr.themes.Soft() | |
) | |
gui.launch() |