Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,16 @@
|
|
1 |
-
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
5 |
|
6 |
-
|
7 |
-
sentence = "I love this product! It's amazing and works perfectly."
|
8 |
-
result = pipe(sentence)
|
9 |
|
10 |
-
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from main import generar_respuesta
|
3 |
|
4 |
+
st.title("📦 Asistente SeguroCargo")
|
5 |
+
st.subheader("Consulta sobre tus envíos nacionales e internacionales")
|
6 |
+
st.write("Bienbenido al chatbot de asistencion de SeguroCargo, cuentanos en que te podemos ayudar el dia de hoy")
|
7 |
|
8 |
+
pregunta = st.text_input("Haz tu pregunta:")
|
|
|
|
|
9 |
|
10 |
+
if st.button("Enviar"):
|
11 |
+
if pregunta.strip():
|
12 |
+
with st.spinner("Generando respuesta..."):
|
13 |
+
respuesta = generar_respuesta(pregunta)
|
14 |
+
st.success(respuesta)
|
15 |
+
else:
|
16 |
+
st.warning("Por favor, escribe una pregunta.")
|