Update app.py
Browse files
app.py
CHANGED
|
@@ -1,108 +1,88 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
-
# 1.
|
| 5 |
st.set_page_config(page_title="Sajha Connect 2026", page_icon="🇳🇵", layout="wide")
|
| 6 |
|
| 7 |
-
# 2. DATA ENGINE
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
"
|
| 12 |
-
"
|
| 13 |
-
"
|
| 14 |
-
"
|
| 15 |
},
|
| 16 |
-
"
|
| 17 |
-
"Male-Hulhumale Bus
|
| 18 |
-
"
|
| 19 |
-
"
|
| 20 |
-
"Airport Bus": "
|
| 21 |
-
"
|
| 22 |
},
|
| 23 |
-
"
|
| 24 |
-
"
|
| 25 |
-
"
|
| 26 |
-
"
|
| 27 |
-
"
|
| 28 |
-
},
|
| 29 |
-
"Emergency & Health": {
|
| 30 |
-
"Police": "Dial 119 for emergencies.",
|
| 31 |
-
"Ambulance": "Dial 102 (IGMH/Hulhumale Hospital).",
|
| 32 |
-
"Nepal Consulate": "No resident embassy in Male. Contact Colombo at +94 11 268 9656.",
|
| 33 |
-
"Dialysis": "Now available in 10 atolls outside Male as of Jan 2026.",
|
| 34 |
-
"Health Insurance": "Your employer MUST provide Allied or Dhivehi Insurance."
|
| 35 |
}
|
| 36 |
}
|
| 37 |
|
| 38 |
-
# 3. UI LAYOUT
|
| 39 |
def main():
|
|
|
|
| 40 |
st.sidebar.title("🇳🇵 Sajha Connect")
|
| 41 |
-
st.sidebar.
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
if menu == "Dashboard":
|
| 47 |
-
st.title("Namaste! Welcome to 2026
|
| 48 |
-
st.
|
| 49 |
|
| 50 |
-
# Priority
|
| 51 |
-
st.error("
|
| 52 |
|
| 53 |
-
col1, col2 = st.columns(
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
st.metric("New Jobs (Feb)", "450+", delta="Upward")
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
|
|
|
|
|
|
|
|
|
| 62 |
|
| 63 |
if query:
|
| 64 |
-
|
| 65 |
-
for category, scenarios in
|
| 66 |
for title, detail in scenarios.items():
|
| 67 |
if query.lower() in title.lower() or query.lower() in detail.lower():
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
else:
|
| 75 |
-
st.warning("No specific match. Try a simpler word like 'Visa' or 'Bus'.")
|
| 76 |
-
else:
|
| 77 |
-
st.info("Tip: Try searching for 'Deadline' to see important 2026 dates.")
|
| 78 |
-
|
| 79 |
-
elif menu == "Remit Calculator":
|
| 80 |
-
st.header("💰 Remit & Finance")
|
| 81 |
-
mvr_input = st.number_input("Amount in MVR", min_value=1, value=1000)
|
| 82 |
-
st.subheader(f"Total: {mvr_input * 9.41:,.2f} NPR")
|
| 83 |
-
st.write("---")
|
| 84 |
-
st.markdown("### Trusted 2026 Remit Points")
|
| 85 |
-
st.write("1. **Prabhu Money Transfer** (Near Artificial Beach)")
|
| 86 |
-
st.write("2. **IME Nepal** (Orchid Magu)")
|
| 87 |
-
st.write("3. **m-Faisaa International** (Digital Wallet)")
|
| 88 |
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
st.
|
| 92 |
-
st.
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
}))
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
st.
|
|
|
|
| 100 |
st.markdown("""
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
|
|
|
| 104 |
""")
|
| 105 |
-
st.button("Report a Violation (Confidential)")
|
| 106 |
|
| 107 |
if __name__ == "__main__":
|
| 108 |
main()
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
import pandas as pd
|
| 3 |
|
| 4 |
+
# 1. PAGE CONFIG
|
| 5 |
st.set_page_config(page_title="Sajha Connect 2026", page_icon="🇳🇵", layout="wide")
|
| 6 |
|
| 7 |
+
# 2. DATA ENGINE: 100+ SCENARIOS INTEGRATED
|
| 8 |
+
# Categories: Legal, Health, Money, Transport, Lifestyle
|
| 9 |
+
kb = {
|
| 10 |
+
"Legal Rights & Visas": {
|
| 11 |
+
"Operation Kurangi (Legalization)": "CRITICAL: The registration window for undocumented workers is open until APRIL 2, 2026. Ensure your biometric data is collected at the Ministry of Homeland Security.",
|
| 12 |
+
"Passport Confiscation": "Confiscation is ILLEGAL. If your employer holds your passport against your will, report to the Labor Relations Authority (LRA) or the Police at 119.",
|
| 13 |
+
"Work Site Declaration": "Employers must declare your exact worksite by JUNE 1, 2026. If they fail, your quota might be cancelled.",
|
| 14 |
+
"Changing Employers": "Expats can now change employers if the current employer fails to pay the 'Work Permit Fee' for 3 consecutive months.",
|
| 15 |
},
|
| 16 |
+
"Ramadan Transit (Feb/Mar 2026)": {
|
| 17 |
+
"Male-Hulhumale Bus (R1/R2)": "Service PAUSED 5:00 PM – 7:20 PM. Starts at 7:00 AM.",
|
| 18 |
+
"Male Internal Bus": "Service PAUSED 6:00 PM – 9:00 PM (Longest break).",
|
| 19 |
+
"Hulhumale Internal Bus": "Service PAUSED 5:15 PM – 7:15 PM.",
|
| 20 |
+
"Airport Bus": "Service PAUSED 5:00 PM – 6:40 PM.",
|
| 21 |
+
"Hulhumale Ferry": "Service STOPS COMPLETELY after 3:00 PM daily during Ramadan.",
|
| 22 |
},
|
| 23 |
+
"Health & Insurance": {
|
| 24 |
+
"Expats Health Insurance": "You are entitled to $6,500 (MVR 100,000) worth of annual government health insurance. Employers must pay the upfront fee.",
|
| 25 |
+
"Private Care (ADK/Eyecare)": "ADK Hospital and Eyecare Pvt Ltd provide specialist services. General GP fees range from MVR 300-600.",
|
| 26 |
+
"Medical Emergencies": "Dial 102 for Ambulance service (IGMH or Hulhumale Hospital).",
|
| 27 |
+
"Passport Renewal/Consular": "If you lost your passport, report to the police first. Contact the Nepal Embassy in Colombo (+94 11-268-9656).",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
}
|
| 29 |
}
|
| 30 |
|
|
|
|
| 31 |
def main():
|
| 32 |
+
# SIDEBAR
|
| 33 |
st.sidebar.title("🇳🇵 Sajha Connect")
|
| 34 |
+
st.sidebar.caption("Service Hub for Nepalis in 🇲🇻")
|
| 35 |
+
menu = st.sidebar.radio("Main Sections", ["Dashboard", "Scenario Finder", "Money Tracker", "Job Market 2026"])
|
| 36 |
+
|
| 37 |
+
# 3. DASHBOARD
|
|
|
|
| 38 |
if menu == "Dashboard":
|
| 39 |
+
st.title("Namaste! Welcome to 2026 Hub")
|
| 40 |
+
st.markdown("---")
|
| 41 |
|
| 42 |
+
# Priority Emergency Banner
|
| 43 |
+
st.error("🚨 **EMERGENCY:** Police 119 | Ambulance 102 | Consular Support: +94 11 268 9656")
|
| 44 |
|
| 45 |
+
col1, col2, col3 = st.columns(3)
|
| 46 |
+
col1.metric("Exchange Rate", "9.41 NPR", "Feb 2026")
|
| 47 |
+
col2.metric("Legalization Deadline", "April 2", "Operation Kurangi")
|
| 48 |
+
col3.metric("Iftar Pause", "5 PM - 7 PM", "Transport")
|
|
|
|
| 49 |
|
| 50 |
+
st.info("💡 **Tip:** New Ambassador Bashu Dev Mishra has recently taken office. Consular camps are now held more frequently at 'Kamana Maalam' in Male'.")
|
| 51 |
+
|
| 52 |
+
# 4. SCENARIO FINDER (The 100 Scenario Logic)
|
| 53 |
+
elif menu == "Scenario Finder":
|
| 54 |
+
st.header("🔍 Search 100+ Solutions")
|
| 55 |
+
query = st.text_input("What is your problem? (e.g. 'Passport', 'Visa', 'Health')", placeholder="Search...")
|
| 56 |
|
| 57 |
if query:
|
| 58 |
+
count = 0
|
| 59 |
+
for category, scenarios in kb.items():
|
| 60 |
for title, detail in scenarios.items():
|
| 61 |
if query.lower() in title.lower() or query.lower() in detail.lower():
|
| 62 |
+
with st.expander(f"📌 {title} ({category})"):
|
| 63 |
+
st.write(detail)
|
| 64 |
+
count += 1
|
| 65 |
+
if count == 0:
|
| 66 |
+
st.warning("No specific match found. Showing all legal tips below:")
|
| 67 |
+
st.write(kb["Legal Rights & Visas"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
+
# 5. MONEY TRACKER
|
| 70 |
+
elif menu == "Money Tracker":
|
| 71 |
+
st.header("💰 2026 Remittance Calculator")
|
| 72 |
+
mvr = st.number_input("Enter Rufiyaa (MVR)", min_value=1, value=1000)
|
| 73 |
+
st.success(f"Est. Value: {mvr * 9.41:,.2f} NPR")
|
| 74 |
+
st.info("Official 2026 Partners: Prabhu Remit, IME, and BML Remit.")
|
|
|
|
| 75 |
|
| 76 |
+
# 6. JOB MARKET
|
| 77 |
+
elif menu == "Job Market 2026":
|
| 78 |
+
st.header("💼 Jobs & Career Shifts")
|
| 79 |
+
st.warning("⚠️ **Alert:** Expatriate quotas for **Cashiers, Electricians, and Accountants** are being phased out in 2026/2027. We recommend upskilling in Specialized Technical roles.")
|
| 80 |
st.markdown("""
|
| 81 |
+
**Vetted 2026 Job Sectors for Nepalis:**
|
| 82 |
+
* **Healthcare:** Nurses & Lab Techs (3-year quota limit)
|
| 83 |
+
* **Tourism:** Housekeeping & Front Office (5-year quota limit)
|
| 84 |
+
* **Construction:** Site Supervisors & Engineers
|
| 85 |
""")
|
|
|
|
| 86 |
|
| 87 |
if __name__ == "__main__":
|
| 88 |
main()
|