Jofax commited on
Commit
25d52df
·
verified ·
1 Parent(s): ebc95e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +61 -81
app.py CHANGED
@@ -1,108 +1,88 @@
1
  import streamlit as st
2
  import pandas as pd
3
 
4
- # 1. CORE CONFIGURATION
5
  st.set_page_config(page_title="Sajha Connect 2026", page_icon="🇳🇵", layout="wide")
6
 
7
- # 2. DATA ENGINE (The "100 Scenarios" Database)
8
- data = {
9
- "Legal & Visa": {
10
- "Mass Legalization 2026": "Open until April 2, 2026 under Operation Kurangi. Apply via your employer in the Xpat system.",
11
- "Passport Rights": "It is illegal for employers to keep your passport. If withheld, call Police at 119.",
12
- "June 2026 Deadline": "Employers must submit notarized Work Site Declarations by June 1, 2026, or their quotas will be suspended.",
13
- "Changing Jobs": "You can change employers if your current one fails to pay your work permit fees for 3 months.",
14
- "Cashier Ban": "As of Feb 5, 2027, expatriates are banned from working as cashiers. Plan your job transition now."
15
  },
16
- "Transport (Ramadan)": {
17
- "Male-Hulhumale Bus": "Services (R1, R2, R7) pause from 5:00 PM to 7:20 PM for Iftar break.",
18
- "Hulhumale Internal Bus": "Pauses from 5:15 PM to 7:15 PM.",
19
- "Male Internal (Orchid/Sosan)": "Pauses from 6:00 PM to 9:00 PM.",
20
- "Airport Bus": "Pauses from 5:00 PM to 7:00 PM.",
21
- "Ferry Service": "Male-Hulhumale ferry stops service after 3:00 PM daily during Ramadan."
22
  },
23
- "Money & Remit": {
24
- "Exchange Rate": "Approx 1 MVR = 9.41 NPR. Rates fluctuate; check Prabhu or IME before sending.",
25
- "BML Pay": "You can now use BML Pay QR in almost all Male shops. No need for cash.",
26
- "Avoid Hundi": "Sending money via Hundi is a criminal offense in 2026. Use official channels to protect your family.",
27
- "Tax on Remittance": "Ensure you use your Work Permit ID for remit to avoid extra service fees."
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.subheader("Male' & Hulhumale' Hub")
42
-
43
- # Navigation
44
- menu = st.sidebar.selectbox("Jump to Section", ["Dashboard", "Search 100 Scenarios", "Remit Calculator", "Transit Hub", "Legal Center"])
45
-
46
  if menu == "Dashboard":
47
- st.title("Namaste! Welcome to 2026 🇲🇻")
48
- st.write("Supporting the 15,000+ Nepali Brothers and Sisters in the Maldives.")
49
 
50
- # Priority Alert
51
- st.error("⚠️ **URGENT:** Operation Kurangi (Legalization) closes April 2, 2026. Get your papers fixed now!")
52
 
53
- col1, col2 = st.columns(2)
54
- with col1:
55
- st.metric("Rate (1 MVR)", "9.41 NPR", delta="0.05")
56
- with col2:
57
- st.metric("New Jobs (Feb)", "450+", delta="Upward")
58
 
59
- elif menu == "Search 100 Scenarios":
60
- st.header("🔍 Solution Finder")
61
- query = st.text_input("Search for help (e.g., 'Passport', 'Bus', 'Legalize')", placeholder="What is your problem?")
 
 
 
62
 
63
  if query:
64
- results = []
65
- for category, scenarios in data.items():
66
  for title, detail in scenarios.items():
67
  if query.lower() in title.lower() or query.lower() in detail.lower():
68
- results.append((category, title, detail))
69
-
70
- if results:
71
- for cat, tit, det in results:
72
- with st.expander(f"[{cat}] {tit}"):
73
- st.write(det)
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
- elif menu == "Transit Hub":
90
- st.header("🚌 2026 Transit Schedule")
91
- st.subheader("Ramadan 1446H Adjustments")
92
- st.table(pd.DataFrame({
93
- "Route": ["Male-Hulhumale Bus", "Airport Bus", "Male Internal", "Hulhumale Ferry"],
94
- "Pause Time": ["17:00 - 19:20", "17:00 - 19:00", "18:00 - 21:00", "After 15:00"]
95
- }))
96
 
97
- elif menu == "Legal Center":
98
- st.header("⚖️ Rights & Regulations")
99
- st.write("### New for 2026")
 
100
  st.markdown("""
101
- - **Work Site Declaration:** Must be done by June 1, 2026.
102
- - **Operation Kurangi:** Jan 1 - April 2, 2026 window for legalizing undocumented workers.
103
- - **Minimum Wage:** Ensure your basic salary aligns with the 2025/2026 updated benchmarks.
 
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()