Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ from modules.kyc_processor import extract_text_from_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 kyc_interface(uploaded_image):
|
9 |
try:
|
@@ -11,15 +12,6 @@ def kyc_interface(uploaded_image):
|
|
11 |
except Exception as e:
|
12 |
return f"Error: {str(e)}"
|
13 |
|
14 |
-
def main():
|
15 |
-
gr.Interface(
|
16 |
-
fn=kyc_interface,
|
17 |
-
inputs=gr.Image(type="filepath", label="Upload ID Document"),
|
18 |
-
outputs="text",
|
19 |
-
title="KYC Document OCR",
|
20 |
-
description="Upload an image of an ID card for OCR-based text extraction."
|
21 |
-
).launch()
|
22 |
-
|
23 |
# 1. Profile Matching
|
24 |
print("\n[1] Profile Matching:")
|
25 |
resume = "Experienced insurance agent with proven sales..."
|
@@ -44,6 +36,15 @@ def main():
|
|
44 |
# 6. Motivation
|
45 |
print("\n[6] Motivation Nudges:")
|
46 |
print(personalized_nudge("Ravi", "10 client meetings"))
|
47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
if __name__ == "__main__":
|
49 |
main()
|
|
|
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 |
+
import gradio as gr
|
8 |
|
9 |
def kyc_interface(uploaded_image):
|
10 |
try:
|
|
|
12 |
except Exception as e:
|
13 |
return f"Error: {str(e)}"
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
# 1. Profile Matching
|
16 |
print("\n[1] Profile Matching:")
|
17 |
resume = "Experienced insurance agent with proven sales..."
|
|
|
36 |
# 6. Motivation
|
37 |
print("\n[6] Motivation Nudges:")
|
38 |
print(personalized_nudge("Ravi", "10 client meetings"))
|
39 |
+
|
40 |
+
def main():
|
41 |
+
gr.Interface(
|
42 |
+
fn=kyc_interface,
|
43 |
+
inputs=gr.Image(type="filepath", label="Upload ID Document"),
|
44 |
+
outputs="text",
|
45 |
+
title="KYC Document OCR",
|
46 |
+
description="Upload an image of an ID card for OCR-based text extraction."
|
47 |
+
).launch()
|
48 |
+
|
49 |
if __name__ == "__main__":
|
50 |
main()
|