samim2024 commited on
Commit
1b5edf5
·
verified ·
1 Parent(s): e9d7ee4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +45 -4
app.py CHANGED
@@ -31,6 +31,11 @@ if "authenticated" not in st.session_state:
31
 
32
  # Sidebar
33
  with st.sidebar:
 
 
 
 
 
34
  st.header("RAG Control Panel")
35
  api_key_input = st.text_input("Enter RAG Access Key", type="password")
36
 
@@ -66,16 +71,53 @@ with st.sidebar:
66
 
67
  # Main app
68
  def main():
69
- # Inject CSS to set gray background
70
  st.markdown("""
71
  <style>
 
72
  .stApp {
73
- background-color: #808080;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  }
75
  </style>
76
  """, unsafe_allow_html=True)
77
 
78
- st.title("BSNL Rourkela Generative AI RAG Q&A App with Mistral AI")
 
79
 
80
  if not st.session_state.authenticated:
81
  st.warning("Please authenticate with your API key in the sidebar.")
@@ -178,4 +220,3 @@ def answer_question(vectorstore, query):
178
 
179
  if __name__ == "__main__":
180
  main()
181
-
 
31
 
32
  # Sidebar
33
  with st.sidebar:
34
+ # BSNL Logo (local file)
35
+ st.image(
36
+ "assets/bsnl_logo.png",
37
+ width=150
38
+ )
39
  st.header("RAG Control Panel")
40
  api_key_input = st.text_input("Enter RAG Access Key", type="password")
41
 
 
71
 
72
  # Main app
73
  def main():
74
+ # Inject CSS for mint theme and attractive styling
75
  st.markdown("""
76
  <style>
77
+ @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
78
  .stApp {
79
+ background-color: #98FF98; /* Mint color */
80
+ font-family: 'Roboto', sans-serif;
81
+ color: #ffffff;
82
+ }
83
+ .stTextInput > div > div > input {
84
+ background-color: #ffffff;
85
+ color: #333333;
86
+ border-radius: 8px;
87
+ border: 1px solid #4CAF50;
88
+ padding: 10px;
89
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
90
+ }
91
+ .stButton > button {
92
+ background-color: #4CAF50;
93
+ color: white;
94
+ border-radius: 8px;
95
+ padding: 10px 20px;
96
+ border: none;
97
+ transition: all 0.3s ease;
98
+ box-shadow: 0 2px 4px rgba(0,0,0,0.2);
99
+ }
100
+ .stButton > button:hover {
101
+ background-color: #45a049;
102
+ transform: scale(1.05);
103
+ }
104
+ .stSidebar {
105
+ background-color: #88EE88;
106
+ padding: 20px;
107
+ border-right: 2px solid #4CAF50;
108
+ }
109
+ h1, h2, h3 {
110
+ color: #ffffff;
111
+ text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
112
+ }
113
+ .stSpinner > div > div {
114
+ border-color: #4CAF50 transparent transparent transparent;
115
  }
116
  </style>
117
  """, unsafe_allow_html=True)
118
 
119
+ st.title("RAG Q&A App with Mistral AI")
120
+ st.markdown("Welcome to the BSNL RAG App! Upload your PDFs and ask questions with ease.", unsafe_allow_html=True)
121
 
122
  if not st.session_state.authenticated:
123
  st.warning("Please authenticate with your API key in the sidebar.")
 
220
 
221
  if __name__ == "__main__":
222
  main()