Spaces:
Sleeping
Sleeping
ruslanruslanruslan
commited on
Commit
•
716c18c
1
Parent(s):
aef8c9d
changes added
Browse files- app.py +12 -9
- pages/Borgesian.py +1 -1
app.py
CHANGED
@@ -1,16 +1,19 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
st.title('A multipage application featuring various Natural Language Processing instruments and functions')
|
4 |
-
|
5 |
-
|
|
|
|
|
|
|
|
|
6 |
<style>
|
7 |
-
|
8 |
-
background-image: url(
|
9 |
-
background-size: cover
|
10 |
-
|
11 |
-
background-attachment: fixed;
|
12 |
-
}
|
13 |
</style>
|
14 |
""",
|
15 |
unsafe_allow_html=True
|
16 |
-
)
|
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
st.title('A multipage application featuring various Natural Language Processing instruments and functions')
|
4 |
+
|
5 |
+
def add_bg_from_local(image_file):
|
6 |
+
with open(image_file, "rb") as image_file:
|
7 |
+
encoded_string = base64.b64encode(image_file.read())
|
8 |
+
st.markdown(
|
9 |
+
f"""
|
10 |
<style>
|
11 |
+
.stApp {{
|
12 |
+
background-image: url(data:image/{"png"};base64,{encoded_string.decode()});
|
13 |
+
background-size: cover
|
14 |
+
}}
|
|
|
|
|
15 |
</style>
|
16 |
""",
|
17 |
unsafe_allow_html=True
|
18 |
+
)
|
19 |
+
add_bg_from_local('aperiodic.png')
|
pages/Borgesian.py
CHANGED
@@ -34,6 +34,6 @@ user_input = st.text_area("Enter your text:")
|
|
34 |
if st.button("Send"):
|
35 |
if user_input:
|
36 |
generate_response(user_input, temperature, length, top_p)
|
37 |
-
st.image('penrose_tiling.jpg')
|
38 |
else:
|
39 |
st.warning("Please enter some text.")
|
|
|
|
34 |
if st.button("Send"):
|
35 |
if user_input:
|
36 |
generate_response(user_input, temperature, length, top_p)
|
|
|
37 |
else:
|
38 |
st.warning("Please enter some text.")
|
39 |
+
st.image('penrose_tiling.jpg')
|