Jofax commited on
Commit
499b5b5
·
verified ·
1 Parent(s): 75217e3

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +83 -0
app.py ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+
4
+ # Set Page Config for a Professional Look
5
+ st.set_page_config(page_title="Sajha Connect - Maldives", page_icon="🇳🇵", layout="wide")
6
+
7
+ # Custom CSS for a "Premium" Mobile-First Feel
8
+ st.markdown("""
9
+ <style>
10
+ .main { background-color: #f5f7f9; }
11
+ .stButton>button { width: 100%; border-radius: 10px; height: 3em; background-color: #003366; color: white; }
12
+ .category-card {
13
+ padding: 20px; border-radius: 15px; background: white;
14
+ box-shadow: 0 4px 6px rgba(0,0,0,0.1); margin-bottom: 20px;
15
+ }
16
+ h1 { color: #d32f2f; }
17
+ </style>
18
+ """, unsafe_allow_html=True)
19
+
20
+ # Sidebar Navigation
21
+ st.sidebar.title("🇳🇵 Sajha Connect")
22
+ st.sidebar.info("The Ultimate Hub for Nepalis in Male & Hulhumale")
23
+ menu = st.sidebar.selectbox("Jump to Section", ["Dashboard", "Remittance Tracker", "Job Board", "Legal & Visa Help", "Community Marketplace", "Emergency & Health"])
24
+
25
+ # Header
26
+ st.title("Sajha Connect: Maldives 🇲🇻")
27
+ st.subheader("Supporting the Nepali Diaspora in Male & Hulhumale")
28
+
29
+ if menu == "Dashboard":
30
+ st.write("### Quick Services")
31
+ col1, col2, col3 = st.columns(3)
32
+
33
+ with col1:
34
+ st.markdown('<div class="category-card"><h4>💰 Money</h4><p>Check IME Rates & Remittance</p></div>', unsafe_allow_html=True)
35
+ if st.button("Check Rates"):
36
+ st.success("Current Rate: 1 MVR = 8.65 NPR (Approx)")
37
+
38
+ with col2:
39
+ st.markdown('<div class="category-card"><h4>🏠 Housing</h4><p>Bedspaces in Hulhumale</p></div>', unsafe_allow_html=True)
40
+ if st.button("Find Rooms"):
41
+ st.info("3 new bedspaces available in Hulhumale Phase 2.")
42
+
43
+ with col3:
44
+ st.markdown('<div class="category-card"><h4>⚖️ Legal</h4><p>Visa & Work Permit Status</p></div>', unsafe_allow_html=True)
45
+ if st.button("Check Permit"):
46
+ st.warning("Ensure your 'Xpat' portal is updated.")
47
+
48
+ st.divider()
49
+
50
+ # The AI Chatbot for the 100 Scenarios
51
+ st.write("### 🤖 Sahayatri AI (Your 24/7 Guide)")
52
+ user_query = st.text_input("Ask anything (e.g., 'How to renew passport?' or 'Cheap lunch in Male')")
53
+ if user_query:
54
+ # Simple Logic for Demo - In production, connect to an LLM like Gemini or Llama
55
+ st.write(f"**Sahayatri says:** I'm searching the 100 community scenarios for '{user_query}'...")
56
+ st.info("Feature Tip: To renew your passport, visit the Nepali Embassy camp in Male or contact the Colombo Embassy via the app's 'Consular' tab.")
57
+
58
+ elif menu == "Remittance Tracker":
59
+ st.header("Financial Hub")
60
+ amount = st.number_input("Enter Amount in MVR", value=1000)
61
+ st.write(f"**Estimated Transfer:** {amount * 8.65} NPR")
62
+ st.button("Compare IME vs Prabhu vs Bank")
63
+
64
+ elif menu == "Job Board":
65
+ st.header("Vetted Jobs for Nepalis")
66
+ jobs = pd.DataFrame({
67
+ "Position": ["Resort Waiter", "Construction Supervisor", "Sales Assistant"],
68
+ "Location": ["Baa Atoll", "Male", "Hulhumale"],
69
+ "Salary": ["$600 + Service Charge", "MVR 12,000", "MVR 8,000"]
70
+ })
71
+ st.table(jobs)
72
+
73
+ elif menu == "Emergency & Health":
74
+ st.error("🚨 EMERGENCY CONTACTS")
75
+ st.write("- **Police:** 119")
76
+ st.write("- **Ambulance:** 102")
77
+ st.write("- **Nepal Helpline:** +960 xxxx xxxx")
78
+ st.button("Call Nepali Doctor Now")
79
+
80
+ # Footer Income Stream (Ad Space)
81
+ st.sidebar.divider()
82
+ st.sidebar.write("**Sponsored**")
83
+ st.sidebar.image("https://via.placeholder.com/150x50?text=IME+Remit+Ad", caption="Best Rates Today!")