Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -149,14 +149,6 @@ custom_css = """
|
|
| 149 |
|
| 150 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 151 |
|
| 152 |
-
# Add logo to the header
|
| 153 |
-
logo_col1, logo_col2 = st.columns([1, 4])
|
| 154 |
-
with logo_col1:
|
| 155 |
-
st.image("android-chrome-512x512.png", width=100)
|
| 156 |
-
with logo_col2:
|
| 157 |
-
st.markdown("## " + t("page_title"))
|
| 158 |
-
st.markdown("##### AI-powered travel assistant for India")
|
| 159 |
-
|
| 160 |
# ------------------------------------------
|
| 161 |
# Translation dictionary and helper functions
|
| 162 |
# ------------------------------------------
|
|
@@ -215,6 +207,24 @@ translations = {
|
|
| 215 |
def t(key):
|
| 216 |
return translations["en"].get(key, key)
|
| 217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
# ------------------------------------------
|
| 219 |
# Initialize all session state variables
|
| 220 |
# ------------------------------------------
|
|
|
|
| 149 |
|
| 150 |
st.markdown(custom_css, unsafe_allow_html=True)
|
| 151 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
# ------------------------------------------
|
| 153 |
# Translation dictionary and helper functions
|
| 154 |
# ------------------------------------------
|
|
|
|
| 207 |
def t(key):
|
| 208 |
return translations["en"].get(key, key)
|
| 209 |
|
| 210 |
+
# Add logo to the header
|
| 211 |
+
logo_col1, logo_col2 = st.columns([1, 4])
|
| 212 |
+
with logo_col1:
|
| 213 |
+
# Check if logo file exists before trying to load it
|
| 214 |
+
logo_path = os.path.join(os.path.dirname(__file__), "android-chrome-512x512.png")
|
| 215 |
+
if os.path.exists(logo_path):
|
| 216 |
+
try:
|
| 217 |
+
st.image(logo_path, width=100)
|
| 218 |
+
except Exception as e:
|
| 219 |
+
# If image fails to load, show emoji as fallback
|
| 220 |
+
st.markdown("# ✈️")
|
| 221 |
+
else:
|
| 222 |
+
# If image doesn't exist, show emoji as fallback
|
| 223 |
+
st.markdown("# ✈️")
|
| 224 |
+
with logo_col2:
|
| 225 |
+
st.markdown("## " + t("page_title"))
|
| 226 |
+
st.markdown("##### AI-powered travel assistant for India")
|
| 227 |
+
|
| 228 |
# ------------------------------------------
|
| 229 |
# Initialize all session state variables
|
| 230 |
# ------------------------------------------
|