Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from modules.profile_matcher import match_profiles
|
2 |
+
from modules.interview_scheduler import suggest_slots
|
3 |
+
from modules.kyc_processor import extract_text_from_id, verify_id
|
4 |
+
from modules.onboarding_trainer import generate_quiz
|
5 |
+
from modules.performance_tracker import analyze_performance
|
6 |
+
from modules.agent_motivation import personalized_nudge
|
7 |
+
|
8 |
+
def main():
|
9 |
+
print("\n--- Agent Recruitment & Management AI App ---")
|
10 |
+
|
11 |
+
# 1. Profile Matching
|
12 |
+
print("\n[1] Profile Matching:")
|
13 |
+
resume = "Experienced insurance agent with proven sales..."
|
14 |
+
job = "Insurance Sales Agent"
|
15 |
+
print("Match:", match_profiles(resume, job))
|
16 |
+
|
17 |
+
# 2. Interview Scheduling
|
18 |
+
print("\n[2] Interview Scheduling:")
|
19 |
+
slots = suggest_slots({'2025-06-20': ['10:00 AM', '3:00 PM']})
|
20 |
+
print("Suggested:", slots)
|
21 |
+
|
22 |
+
# 3. KYC Verification
|
23 |
+
print("\n[3] KYC Document Verification:")
|
24 |
+
text = extract_text_from_id("sample_id.jpg")
|
25 |
+
print("Verified:", verify_id(text))
|
26 |
+
|
27 |
+
# 4. Onboarding Quiz
|
28 |
+
print("\n[4] AI Onboarding Quiz:")
|
29 |
+
quiz = generate_quiz("Insurance Policy")
|
30 |
+
print("Quiz:", quiz)
|
31 |
+
|
32 |
+
# 5. Performance Tracking
|
33 |
+
print("\n[5] Agent Performance Alerts:")
|
34 |
+
agents = [{'name': 'Ravi', 'sales': 3}, {'name': 'Priya', 'sales': 8}]
|
35 |
+
print("Alerts:", analyze_performance(agents))
|
36 |
+
|
37 |
+
# 6. Motivation
|
38 |
+
print("\n[6] Motivation Nudges:")
|
39 |
+
print(personalized_nudge("Ravi", "10 client meetings"))
|
40 |
+
|
41 |
+
if __name__ == "__main__":
|
42 |
+
main()
|