Update app.py
Browse files
app.py
CHANGED
|
@@ -1,87 +1,71 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
-
#
|
| 5 |
-
st.set_page_config(
|
| 6 |
-
page_title="Sajha Connect - Maldives 2026",
|
| 7 |
-
page_icon="🇳🇵",
|
| 8 |
-
layout="wide"
|
| 9 |
-
)
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
.
|
| 15 |
-
.stMetric { background-color: #ffffff; padding: 15px; border-radius: 10px; box-shadow: 2px 2px 5px rgba(0,0,0,0.1); }
|
| 16 |
-
.emergency-box { padding: 20px; background-color: #ff4b4b; color: white; border-radius: 10px; }
|
| 17 |
-
</style>
|
| 18 |
-
""", unsafe_allow_html=True)
|
| 19 |
-
|
| 20 |
-
# 3. Sidebar Navigation
|
| 21 |
-
st.sidebar.image("https://flagcdn.com/w320/np.png", width=100)
|
| 22 |
-
st.sidebar.title("Sajha Connect 🇳🇵")
|
| 23 |
-
menu = st.sidebar.radio("Main Menu", [
|
| 24 |
-
"🏠 Dashboard",
|
| 25 |
-
"💰 Money Transfer (Remit)",
|
| 26 |
-
"🚢 Transport (Ferry/Bus)",
|
| 27 |
-
"⚖️ Labor Law & Visa",
|
| 28 |
-
"📞 Emergency & Embassy"
|
| 29 |
-
])
|
| 30 |
-
|
| 31 |
-
# 4. Content Logic
|
| 32 |
-
if menu == "🏠 Dashboard":
|
| 33 |
-
st.title("Namaste! Welcome to Sajha Connect 🇲🇻")
|
| 34 |
-
st.info("Updated: February 21, 2026 | Serving 15,000+ Nepali Brothers & Sisters")
|
| 35 |
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
| 42 |
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
"Route": ["Male to Hulhumale", "Male to Vilingili", "Airport Ferry"],
|
| 62 |
-
"Frequency": ["Every 15 mins", "Every 10 mins", "Every 15 mins"],
|
| 63 |
-
"Fare": ["MVR 10", "MVR 5", "MVR 15"]
|
| 64 |
-
}))
|
| 65 |
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
|
|
|
| 83 |
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
st.sidebar.write("💰 **Sponsored Ad**")
|
| 87 |
-
st.sidebar.button("Send Gift to Nepal via Foodmandu")
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
+
# Initial configuration
|
| 5 |
+
st.set_page_config(page_title="Sajha Connect Maldives", page_icon="🇳🇵")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
+
def main():
|
| 8 |
+
# Sidebar for Navigation
|
| 9 |
+
st.sidebar.title("🇳🇵 Sajha Connect")
|
| 10 |
+
st.sidebar.markdown("Connecting the Nepali Community in 🇲🇻")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
+
choice = st.sidebar.radio("Navigate to:", [
|
| 13 |
+
"Dashboard",
|
| 14 |
+
"Remittance (Money)",
|
| 15 |
+
"Bus & Ferry",
|
| 16 |
+
"Legal & Visa",
|
| 17 |
+
"Emergency"
|
| 18 |
+
])
|
| 19 |
|
| 20 |
+
# 1. Dashboard
|
| 21 |
+
if choice == "Dashboard":
|
| 22 |
+
st.title("Sajha Connect Dashboard")
|
| 23 |
+
st.info("Welcome to the 2026 Hub for Nepalis in Male' and Hulhumale'.")
|
| 24 |
+
|
| 25 |
+
col1, col2 = st.columns(2)
|
| 26 |
+
with col1:
|
| 27 |
+
st.metric("Exchange Rate", "1 MVR = 9.41 NPR")
|
| 28 |
+
with col2:
|
| 29 |
+
st.metric("Active Jobs", "12 New Today")
|
| 30 |
+
|
| 31 |
+
st.markdown("### 🔔 Important Announcements")
|
| 32 |
+
st.warning("Ramadan transit hours are now in effect. Bus services pause between 5 PM and 7 PM.")
|
| 33 |
|
| 34 |
+
# 2. Remittance
|
| 35 |
+
elif choice == "Remittance (Money)":
|
| 36 |
+
st.header("Money Transfer (Remit)")
|
| 37 |
+
mvr = st.number_input("Enter Maldivian Rufiyaa (MVR)", min_value=0, value=1000)
|
| 38 |
+
npr = mvr * 9.41
|
| 39 |
+
st.success(f"You will receive approx: {npr:,.2f} Nepalese Rupees")
|
| 40 |
+
st.markdown("---")
|
| 41 |
+
st.write("📍 **Recommended Centers:** Prabhu Money Transfer, IME, and BML.")
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
# 3. Bus & Ferry
|
| 44 |
+
elif choice == "Bus & Ferry":
|
| 45 |
+
st.header("Transit & Transportation")
|
| 46 |
+
st.write("Current RTL Bus Schedules for Male-Hulhumale:")
|
| 47 |
+
df = pd.DataFrame({
|
| 48 |
+
"Route": ["R1 (Phase 1)", "R2 (Phase 2)", "R7 (Bridge)", "Ferry"],
|
| 49 |
+
"Status": ["Running", "Running", "Limited", "Running"],
|
| 50 |
+
"Price": ["MVR 15", "MVR 15", "MVR 10", "MVR 10"]
|
| 51 |
+
})
|
| 52 |
+
st.table(df)
|
| 53 |
+
|
| 54 |
+
# 4. Legal & Visa
|
| 55 |
+
elif choice == "Legal & Visa":
|
| 56 |
+
st.header("Legal Help & Work Permits")
|
| 57 |
+
st.write("Ensure your employer has paid the 'Quota Fee' in the Xpat portal.")
|
| 58 |
+
st.error("Report issues: If your passport is withheld, contact the Labor Relations Authority (LRA).")
|
| 59 |
|
| 60 |
+
# 5. Emergency
|
| 61 |
+
elif choice == "Emergency":
|
| 62 |
+
st.header("🆘 Emergency Contacts")
|
| 63 |
+
st.markdown("""
|
| 64 |
+
- **Police:** 119
|
| 65 |
+
- **Ambulance:** 102
|
| 66 |
+
- **Fire:** 118
|
| 67 |
+
- **Nepal Consular Help:** +94 11 268 9656 (via Colombo)
|
| 68 |
+
""")
|
| 69 |
|
| 70 |
+
if __name__ == "__main__":
|
| 71 |
+
main()
|
|
|
|
|
|