File size: 2,646 Bytes
7ec6fbc
 
 
 
 
 
 
 
b646369
 
 
 
 
 
3fe0bbf
b646369
 
 
 
 
3fe0bbf
b646369
 
 
 
 
 
 
3fe0bbf
 
b646369
 
 
 
 
 
 
 
3fe0bbf
 
b646369
 
 
 
 
 
 
 
3fe0bbf
b646369
 
 
3fe0bbf
b646369
 
 
 
 
 
3fe0bbf
b646369
 
 
 
3fe0bbf
0204fe9
 
497a68f
 
 
 
 
 
3fe0bbf
7ec6fbc
497a68f
0d5a6d1
7ec6fbc
0d5a6d1
 
7ec6fbc
0d5a6d1
 
 
 
 
b646369
7ec6fbc
0d5a6d1
 
7ec6fbc
0d5a6d1
b646369
7ec6fbc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
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("""
    <style>
    /* General styling */
    body {
        background-color: white;
        color: black;  /* Black text */
    }
    
    /* Chatbot title styling */
    .title {
        font-size: 48px;
        color: #004d00; /* Dark green */
        text-align: center;
        font-family: 'Arial', sans-serif;
    }
    
    /* Response styling */
    .response {
        font-size: 20px;
        color: black; /* Black text */
        background-color: #f5f5f5; /* Light gray background */
        border-radius: 10px;
        padding: 20px;
        margin: 20px 0;
        font-family: 'Arial', sans-serif;
    }

    /* Button styling */
    button {
        background-color: #004d00;  /* Dark green */
        color: white; /* White text */
        font-size: 18px;
        padding: 10px;
        border-radius: 5px;
        width: 100%;
    }

    /* Text area styling */
    textarea {
        border: 1px solid #004d00; /* Dark green border */
        border-radius: 5px;
        padding: 10px;
        font-size: 16px;
        color: black; /* Black text */
    }
    
    /* Footer styling */
    footer {
        text-align: center;
        font-size: 14px;
        color: #004d00; /* Dark green */
        margin-top: 50px;
    }
    </style>
    """, 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"""
    <div style='text-align: center;'>
        <img src="{image_url}" width="300">
    </div>
    """, unsafe_allow_html=True)


# Create a Streamlit app
st.markdown("<div class='title'>KYC Virtual Assistant</div>", 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"<div class='response'>{response}</div>", 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("<footer>Powered by KYC SUD CONSULTING</footer>", unsafe_allow_html=True)