Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -111,48 +111,44 @@ st.set_page_config(
|
|
111 |
initial_sidebar_state="expanded",
|
112 |
)
|
113 |
|
114 |
-
add_auth(required=
|
115 |
|
116 |
if st.session_state.email is not '':
|
117 |
st.write('')
|
118 |
st.write(f'User: {st.session_state.email}')
|
119 |
-
if "buttons" in st.session_state:
|
120 |
-
st.session_state.buttons = st.session_state.buttons
|
121 |
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
else:
|
158 |
-
st.write('Please login to your account')
|
|
|
111 |
initial_sidebar_state="expanded",
|
112 |
)
|
113 |
|
114 |
+
add_auth(required=False, login_button_color="#FFA500",subscribe_color_button="#FFA500")
|
115 |
|
116 |
if st.session_state.email is not '':
|
117 |
st.write('')
|
118 |
st.write(f'User: {st.session_state.email}')
|
|
|
|
|
119 |
|
120 |
+
if "buttons" in st.session_state:
|
121 |
+
st.session_state.buttons = st.session_state.buttons
|
122 |
+
|
123 |
+
from PIL import Image
|
124 |
+
import base64
|
125 |
+
|
126 |
+
def get_base64_of_bin_file(bin_file):
|
127 |
+
with open(bin_file, 'rb') as f:
|
128 |
+
data = f.read()
|
129 |
+
return base64.b64encode(data).decode()
|
130 |
+
|
131 |
+
def set_png_as_page_bg(png_file):
|
132 |
+
bin_str = get_base64_of_bin_file(png_file)
|
133 |
+
page_bg_img = '''
|
134 |
+
<style>
|
135 |
+
.stApp {
|
136 |
+
background-image: url("data:image/png;base64,%s");
|
137 |
+
background-size: cover;
|
138 |
+
}
|
139 |
+
</style>
|
140 |
+
''' % bin_str
|
141 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
142 |
+
|
143 |
+
|
144 |
+
if st.toggle('Set background image', True):
|
145 |
+
set_png_as_page_bg('saucer.webp') # Replace with your background image path
|
146 |
+
|
147 |
+
pg = st.navigation([
|
148 |
+
st.Page("rag_search.py", title="Smart-Search (Retrieval Augmented Generations)", icon="๐"),
|
149 |
+
st.Page("parsing.py", title="UAP Feature Extraction (Shape, Speed, Color)", icon="๐"),
|
150 |
+
st.Page("analyzing.py", title="Statistical Analysis (UMAP+HDBSCAN, XGBoost, V-Cramer)", icon="๐ง "),
|
151 |
+
st.Page("magnetic.py", title="Magnetic Anomaly Detection (InterMagnet Stations)", icon="๐งฒ"),
|
152 |
+
st.Page("map.py", title="Interactive Map (Tracking variations, Proximity with Military Bases, Nuclear Facilities)", icon="๐บ๏ธ"),
|
153 |
+
])
|
154 |
+
pg.run()
|
|
|
|