pankajsingh3012 commited on
Commit
ac57f34
·
verified ·
1 Parent(s): 9bc78c5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -0
app.py CHANGED
@@ -1,6 +1,29 @@
1
  import streamlit as st
2
  from langchain_helper import get_qa_chain, create_vector_db
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  st.title("Codebasics Q&A 🌱")
5
  btn = st.button("Create Knowledgebase")
6
  if btn:
 
1
  import streamlit as st
2
  from langchain_helper import get_qa_chain, create_vector_db
3
 
4
+ titleimg = "bg.jpeg"
5
+
6
+ #impliment background formating
7
+ def set_bg_hack(main_bg):
8
+ # set bg name
9
+ main_bg_ext = "jpeg"
10
+ st.markdown(
11
+ f"""
12
+ <style>
13
+ .stApp {{
14
+ background: url(data:image/{main_bg_ext};base64,{base64.b64encode(open(main_bg, "rb").read()).decode()});
15
+ background-repeat: no-repeat;
16
+ background-position: right 50% bottom 95% ;
17
+ background-size: contain;
18
+ background-attachment: scroll;
19
+ }}
20
+ </style>
21
+ """,
22
+ unsafe_allow_html=True,
23
+ )
24
+
25
+ set_bg_hack(titleimg)
26
+
27
  st.title("Codebasics Q&A 🌱")
28
  btn = st.button("Create Knowledgebase")
29
  if btn: