Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -114,46 +114,45 @@ st.set_page_config(
|
|
114 |
add_auth(required=True, login_button_color="#FFA500",subscribe_color_button="#FFA500")
|
115 |
|
116 |
if st.session_state.email is not '':
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
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 |
-
pg.run()
|
156 |
-
else:
|
157 |
-
st.write('Please subscribe to access tools')
|
158 |
else:
|
159 |
-
st.write('Please
|
|
|
|
|
|
114 |
add_auth(required=True, 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 |
+
if "buttons" in st.session_state:
|
120 |
+
st.session_state.buttons = st.session_state.buttons
|
121 |
+
|
122 |
+
from PIL import Image
|
123 |
+
import base64
|
124 |
+
|
125 |
+
def get_base64_of_bin_file(bin_file):
|
126 |
+
with open(bin_file, 'rb') as f:
|
127 |
+
data = f.read()
|
128 |
+
return base64.b64encode(data).decode()
|
129 |
+
|
130 |
+
def set_png_as_page_bg(png_file):
|
131 |
+
bin_str = get_base64_of_bin_file(png_file)
|
132 |
+
page_bg_img = '''
|
133 |
+
<style>
|
134 |
+
.stApp {
|
135 |
+
background-image: url("data:image/png;base64,%s");
|
136 |
+
background-size: cover;
|
137 |
+
}
|
138 |
+
</style>
|
139 |
+
''' % bin_str
|
140 |
+
st.markdown(page_bg_img, unsafe_allow_html=True)
|
141 |
+
|
142 |
+
|
143 |
+
if st.toggle('Set background image', True):
|
144 |
+
set_png_as_page_bg('saucer.webp') # Replace with your background image path
|
145 |
+
|
146 |
+
if st.session_state.user_subscribed:
|
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()
|
|
|
|
|
|
|
155 |
else:
|
156 |
+
st.write('Please subscribe to access tools')
|
157 |
+
else:
|
158 |
+
st.write('Please login to your account')
|