import streamlit as st from rag_retriever import initialize_llm, initialize_pinecone, create_query_engine, get_response # Initialize LLM and Pinecone initialize_llm() index = initialize_pinecone() query_engine = create_query_engine(index) # Inject custom CSS for aesthetics st.markdown(""" """, unsafe_allow_html=True) # Add the image at the top image_url = "https://th.bing.com/th/id/OIP.9aA0fOLzb4r7HUPzWKvUiwAAAA?rs=1&pid=ImgDetMain" # Replace this with your image URL st.markdown(f"""
""", unsafe_allow_html=True) # Create a Streamlit app st.markdown("
KYC Virtual Assistant
", unsafe_allow_html=True) st.markdown("### Ask me anything about our company!") # Create a text input field for the user to enter their query query = st.text_area("Your Question:", "", height=100) # Create a button to trigger the response generation if st.button("Get Answer"): # Get the response from the query engine response = get_response(query_engine, query) # Display the response st.markdown(f"
{response}
", unsafe_allow_html=True) # Add some whitespace to make the app look more spacious st.write("\n\n") # Add a footer with some text st.markdown("", unsafe_allow_html=True)