AlejandraGG commited on
Commit
85d78c0
·
verified ·
1 Parent(s): 3150a2e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -8
app.py CHANGED
@@ -1,11 +1,16 @@
1
- from transformers import pipeline
 
2
 
3
- # Load the classification pipeline with the specified model
4
- pipe = pipeline("text-classification", model="tabularisai/multilingual-sentiment-analysis")
 
5
 
6
- # Classify a new sentence
7
- sentence = "I love this product! It's amazing and works perfectly."
8
- result = pipe(sentence)
9
 
10
- # Print the result
11
- print(result)
 
 
 
 
 
 
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.")