Spaces:
Build error
Build error
Commit ·
9ec4448
1
Parent(s): 6591526
Upload app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from tools import ask_chatbot
|
| 3 |
+
|
| 4 |
+
def check_inputs(question):
|
| 5 |
+
if(question !="" ):
|
| 6 |
+
respuesta = ask_chatbot(question)
|
| 7 |
+
return respuesta
|
| 8 |
+
else:
|
| 9 |
+
return "!Ups, hubo un Error! - Nos hacen falta información para poder ayudarte", None
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
# Descripción del Header
|
| 13 |
+
description = """
|
| 14 |
+
<center><h1><b>Hest.ia 👑 </b></h1>
|
| 15 |
+
<center><h2><b>Acompañante durante vuelos espaciales 🗣️💡 </b></h2>
|
| 16 |
+
Simplemente carga respuestas a ciertas preguntas clave y obtén conclusiones detalladas sobre tu viaje.
|
| 17 |
+
</center>
|
| 18 |
+
"""
|
| 19 |
+
|
| 20 |
+
# Descripción del Footer
|
| 21 |
+
article = """
|
| 22 |
+
<br>
|
| 23 |
+
<b>¿Por qué elegirnos?</b>
|
| 24 |
+
<br><b>Hest.ia 👑</b>, tu aliado inteligente para mejorar tus habilidades comunicativas 💯. <br>Hacemos análisis de tus respuestas ante preguntas 🔍 y te damos feedback para mejorar tu viaje espacial 🙌.
|
| 25 |
+
<br>Descubre el poder de la inteligencia artificial aplicada a potenciar los viajes espaciales.🤖💡
|
| 26 |
+
"""
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
# Inputs
|
| 30 |
+
question = gr.Textbox(label="Contame, en qué te puedo ayudar ❓")
|
| 31 |
+
|
| 32 |
+
# Outputs
|
| 33 |
+
resultado = gr.Textbox(label="Respuesta 💡")
|
| 34 |
+
|
| 35 |
+
gui = gr.Interface(
|
| 36 |
+
fn=check_inputs,
|
| 37 |
+
inputs=[question],
|
| 38 |
+
outputs=[resultado],
|
| 39 |
+
description = description,
|
| 40 |
+
article = article,
|
| 41 |
+
theme=gr.themes.Soft()
|
| 42 |
+
)
|
| 43 |
+
|
| 44 |
+
gui.launch()
|