Elbachaik commited on
Commit
b646369
·
verified ·
1 Parent(s): 41b4cca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +61 -4
app.py CHANGED
@@ -6,8 +6,66 @@ initialize_llm()
6
  index = initialize_pinecone()
7
  query_engine = create_query_engine(index)
8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  # Create a Streamlit app
10
- st.title("KYC SUD CONSULTING Chatbot")
11
  st.markdown("### Ask me anything about our company!")
12
 
13
  # Create a text input field for the user to enter their query
@@ -18,13 +76,12 @@ if st.button("Get Answer"):
18
  # Get the response from the query engine
19
  response = get_response(query_engine, query)
20
  # Display the response
21
- st.write("### Response:")
22
- st.write(response)
23
 
24
  # Add some whitespace to make the app look more spacious
25
  st.write("\n\n")
26
 
27
  # Add a footer with some text
28
- st.markdown("### Powered by KYC SUD CONSULTING")
29
 
30
 
 
6
  index = initialize_pinecone()
7
  query_engine = create_query_engine(index)
8
 
9
+ # Inject custom CSS for aesthetics
10
+ st.markdown("""
11
+ <style>
12
+ /* General styling */
13
+ body {
14
+ background-color: white;
15
+ color: #0a3d62; /* Dark greenish-blue */
16
+ }
17
+
18
+ /* Chatbot title styling */
19
+ .title {
20
+ font-size: 48px;
21
+ color: #0a3d62; /* Dark greenish-blue */
22
+ text-align: center;
23
+ font-family: 'Arial', sans-serif;
24
+ }
25
+
26
+ /* Response styling */
27
+ .response {
28
+ font-size: 20px;
29
+ color: #0a3d62; /* Dark greenish-blue */
30
+ background-color: #f5f5f5;
31
+ border-radius: 10px;
32
+ padding: 20px;
33
+ margin: 20px 0;
34
+ font-family: 'Arial', sans-serif;
35
+ }
36
+
37
+ /* Button styling */
38
+ button {
39
+ background-color: #16a085; /* Green */
40
+ color: white;
41
+ font-size: 18px;
42
+ padding: 10px;
43
+ border-radius: 5px;
44
+ width: 100%;
45
+ }
46
+
47
+ /* Text area styling */
48
+ textarea {
49
+ border: 1px solid #16a085;
50
+ border-radius: 5px;
51
+ padding: 10px;
52
+ font-size: 16px;
53
+ color: #0a3d62;
54
+ }
55
+
56
+ /* Footer styling */
57
+ footer {
58
+ text-align: center;
59
+ font-size: 14px;
60
+ color: #16a085;
61
+ margin-top: 50px;
62
+ }
63
+
64
+ </style>
65
+ """, unsafe_allow_html=True)
66
+
67
  # Create a Streamlit app
68
+ st.markdown("<div class='title'>KYC SUD CONSULTING Chatbot</div>", unsafe_allow_html=True)
69
  st.markdown("### Ask me anything about our company!")
70
 
71
  # Create a text input field for the user to enter their query
 
76
  # Get the response from the query engine
77
  response = get_response(query_engine, query)
78
  # Display the response
79
+ st.markdown(f"<div class='response'>{response}</div>", unsafe_allow_html=True)
 
80
 
81
  # Add some whitespace to make the app look more spacious
82
  st.write("\n\n")
83
 
84
  # Add a footer with some text
85
+ st.markdown("<footer>Powered by KYC SUD CONSULTING</footer>", unsafe_allow_html=True)
86
 
87