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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +77 -74
app.py CHANGED
@@ -1,88 +1,91 @@
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()
 
1
  import streamlit as st
2
  import pandas as pd
3
 
4
+ # 1. SETUP
5
  st.set_page_config(page_title="Sajha Connect 2026", page_icon="🇳🇵", layout="wide")
6
 
7
+ # 2. REAL-TIME DATA (FEB 21, 2026)
8
+ npr_rate = 9.41 # Current MVR to NPR
9
+
10
+ # Housing Data from Feb 2026 iBay Listings
11
+ rentals = [
12
+ {"Title": "1BR Apartment (Lift/AC)", "Price": 16000, "Loc": "Hulhumale Phase 2", "ID": "6488093"},
13
+ {"Title": "2BR Furnished Apt", "Price": 24000, "Loc": "Hulhumale Phase 1", "ID": "6482022"},
14
+ {"Title": "2BR Apt (No Lift)", "Price": 10000, "Loc": "Male (Henveiru)", "ID": "6489042"},
15
+ {"Title": "Bedspace (Male)", "Price": 3500, "Loc": "Male City", "ID": "iBay-Shared"}
16
+ ]
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
+ # 3. SIDEBAR NAVIGATION
19
+ st.sidebar.title("🇳🇵 Sajha Connect")
20
+ st.sidebar.markdown("Connecting Nepalis in 🇲🇻")
21
+ menu = st.sidebar.radio("Navigate", ["Dashboard", "Rental Finder", "Ramadan Transit", "Money Transfer", "Legal & 100 Scenarios"])
 
22
 
23
+ # 4. DASHBOARD
24
+ if menu == "Dashboard":
25
+ st.title("Namaste! 🇳🇵 February 2026 Update")
26
+ st.info("The Ramadan 1447H schedule is now active. Check Transit Hub for Iftar pauses.")
27
+
28
+ col1, col2, col3 = st.columns(3)
29
+ col1.metric("1 MVR to NPR", f"{npr_rate}", "Stable")
30
+ col2.metric("Operation Kurangi", "Apr 2 Deadline", "Action Required")
31
+ col3.metric("Iftar Pause", "5:00 - 7:00 PM", "Bus/Ferry")
 
 
 
32
 
33
+ # 5. RENTAL FINDER (Upgraded with iBay 2026 Data)
34
+ elif menu == "Rental Finder":
35
+ st.header("🏠 Rental Space & Shared Rooms")
36
+ st.write("Latest listings curated from iBay.mv (Feb 2026)")
37
+
38
+ loc_filter = st.selectbox("Area Filter", ["All", "Male City", "Hulhumale Phase 1", "Hulhumale Phase 2"])
39
+
40
+ for r in rentals:
41
+ if loc_filter == "All" or loc_filter in r["Loc"]:
42
+ with st.container():
43
+ st.markdown(f"""
44
+ <div style="border:1px solid #ddd; padding:15px; border-radius:10px; margin-bottom:10px; background:#f9f9f9;">
45
+ <h4 style="margin:0; color:#d32f2f;">{r['Title']}</h4>
46
+ <p style="margin:5px 0;"><b>Rent:</b> MVR {r['Price']:,} | <b>Location:</b> {r['Loc']}</p>
47
+ <p style="margin:0; font-size:12px; color:gray;">Ref ID: {r['ID']} | Source: iBay.mv</p>
48
+ </div>
49
+ """, unsafe_allow_html=True)
50
+
51
+ st.markdown("---")
52
+ st.subheader("💡 2026 Rental Rights")
53
+ st.warning("Under the Residential Tenancy Act, security deposits **cannot exceed 2 months' rent**. Always demand a receipt.")
54
 
55
+ # 6. RAMADAN TRANSIT (MTCC FEB 2026 UPDATES)
56
+ elif menu == "Ramadan Transit":
57
+ st.header("🚌 Ramadan 2026 Transit Schedule")
58
+ st.error("⚠️ PEAK PAUSE: Most services stop between 5:00 PM and 7:00 PM for Iftar.")
59
+
60
+ transit_data = {
61
+ "Route": ["Male-Hulhumale Bus", "Male-Airport Bus", "Hulhumale Internal", "Male Internal (Orchid)", "Male-Hulhumale Ferry"],
62
+ "Pause Window": ["5:00 PM - 7:00 PM", "5:00 PM - 6:40 PM", "5:15 PM - 7:15 PM", "6:00 PM - 9:00 PM", "Stops after 3:00 PM"]
63
+ }
64
+ st.table(pd.DataFrame(transit_data))
65
+ st.info("Last trips usually end 15-30 minutes before sunset.")
 
 
 
 
 
66
 
67
+ # 7. MONEY TRANSFER
68
+ elif menu == "Money Transfer":
69
+ st.header("💰 Remittance Hub")
70
+ mvr_in = st.number_input("Enter Amount (MVR)", min_value=1, value=1000)
71
+ st.success(f"Est. Value: {mvr_in * npr_rate:,.2f} NPR")
72
+ st.write("---")
73
+ st.markdown("### Official Remit Centers in Male':")
74
+ st.markdown("- **Prabhu Money Transfer** (Near Artificial Beach)\n- **IME Nepal** (Orchid Magu)\n- **BML Remit** (Via BML Mobile App)")
75
 
76
+ # 8. LEGAL & 100 SCENARIOS
77
+ elif menu == "Legal & 100 Scenarios":
78
+ st.header("⚖️ Legal & Daily Help")
79
+ scenarios = {
80
+ "Operation Kurangi": "The window for undocumented workers to fix their status closes **April 2, 2026**. Visit the Ministry of Homeland Security immediately.",
81
+ "Passport Confiscation": "It is ILLEGAL for your employer to hold your passport. If they do, call 119.",
82
+ "Health Insurance": "Your employer MUST provide health insurance (Allied or Dhivehi). You have up to MVR 100,000 coverage.",
83
+ "Lost Passport": "Report to the nearest Police Station. Contact Nepal Embassy Colombo: +94 11-268-9656."
84
+ }
85
+
86
+ for s_title, s_detail in scenarios.items():
87
+ with st.expander(s_title):
88
+ st.write(s_detail)
89
 
90
  if __name__ == "__main__":
91
  main()