Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,7 +10,7 @@ import matplotlib.pyplot as plt
|
|
| 10 |
import plotly.express as px
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
-
# Define categories for Teach For India Bot and Firki
|
| 14 |
categories_keywords_tfi = {
|
| 15 |
'Start of Conversation': ['hi', 'hello', 'hi I have a query', 'query', 'good morning', 'good afternoon', 'good evening'],
|
| 16 |
'Application Status': ['application', 'applied', 'update on my application', 'result of my application', 'selected', 'selection process', 'apply', 'fellow', 'lesson plan', 'status of my application', 'application update', 'application status', 'applied for'],
|
|
@@ -33,15 +33,34 @@ categories_keywords_tfi = {
|
|
| 33 |
}
|
| 34 |
|
| 35 |
categories_keywords_firki = {
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
}
|
| 43 |
|
| 44 |
-
# Initialize
|
| 45 |
categories_keywords = categories_keywords_tfi
|
| 46 |
|
| 47 |
def categorize_question(question, categories_keywords):
|
|
|
|
| 10 |
import plotly.express as px
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
+
# Define categories for Teach For India Bot and Firki Bot
|
| 14 |
categories_keywords_tfi = {
|
| 15 |
'Start of Conversation': ['hi', 'hello', 'hi I have a query', 'query', 'good morning', 'good afternoon', 'good evening'],
|
| 16 |
'Application Status': ['application', 'applied', 'update on my application', 'result of my application', 'selected', 'selection process', 'apply', 'fellow', 'lesson plan', 'status of my application', 'application update', 'application status', 'applied for'],
|
|
|
|
| 33 |
}
|
| 34 |
|
| 35 |
categories_keywords_firki = {
|
| 36 |
+
"Application Status": ["application status", "application", "status", "submitted", "processing", "pending", "approval", "rejected", "accepted"],
|
| 37 |
+
"Volunteering": ["volunteer", "volunteering", "help out", "assist", "volunteer work", "volunteer opportunities"],
|
| 38 |
+
"Certificates": ["certificate", "certificates", "completion", "certification", "accreditation", "proof", "document", "certified"],
|
| 39 |
+
"Job Opportunities": ["job", "opportunity", "career", "vacancy", "position", "employment", "hiring", "recruitment", "internship"],
|
| 40 |
+
"Surveys and Forms": ["survey", "form", "forms", "questionnaire", "feedback form", "response", "fill out", "submission"],
|
| 41 |
+
"General Queries": ["hello", "hi", "help", "general", "query", "question", "info", "information", "inquiry", "ask"],
|
| 42 |
+
"Spam": ["spam", "unsubscribe", "remove", "stop", "junk", "block", "opt-out"],
|
| 43 |
+
"Rescheduling and Postponing": ["reschedule", "postpone", "delay", "change date", "new time", "rearrange", "shift", "adjust timing"],
|
| 44 |
+
"Contact and Communication Issues": ["contact", "communicate", "communication", "reach out", "phone", "email", "address", "details"],
|
| 45 |
+
"Email and Credentials Issues": ["email", "credentials", "login", "password", "access", "username", "account", "verification", "reset"],
|
| 46 |
+
"Timing and Scheduling": ["timing", "schedule", "scheduling", "time", "appointment", "availability", "calendar", "book", "slot"],
|
| 47 |
+
"Salary and Benefits": ["salary", "benefits", "pay", "compensation", "wages", "earnings", "package", "remuneration", "incentives"],
|
| 48 |
+
"Technical Issues": ["technical", "issue", "problem", "error", "bug", "glitch", "fix", "troubleshoot", "support"],
|
| 49 |
+
"End of Conversation": ["bye", "thank you", "thanks", "goodbye", "see you", "later", "end", "close", "sign off"],
|
| 50 |
+
"Start of Conversation": ["start", "begin", "hello", "hi", "initiate", "greet", "greeting", "open", "commence"],
|
| 51 |
+
"Feedback": ["feedback", "comments", "review", "opinion", "suggestion", "critique", "rating"],
|
| 52 |
+
"Event Inquiries": ["event", "webinar", "meeting", "conference", "session", "seminar", "workshop", "invitation"],
|
| 53 |
+
"Payment Issues": ["payment", "billing", "transaction", "charge", "fee", "invoice", "refund", "receipt"],
|
| 54 |
+
"Registration Issues": ["registration", "register", "sign up", "enroll", "join", "signup", "enrollment"],
|
| 55 |
+
"Service Requests": ["service", "support", "request", "assistance", "help", "aid", "maintenance"],
|
| 56 |
+
"Account Issues": ["account", "profile", "update", "activation", "deactivation", "credentials", "reset"],
|
| 57 |
+
"Product Information": ["product", "service", "details", "info", "information", "specifications", "features"],
|
| 58 |
+
"Order Status": ["order", "status", "tracking", "shipment", "delivery", "purchase", "dispatch"],
|
| 59 |
+
"Miscellaneous": ["miscellaneous", "other", "various", "random", "general", "unknown", "unsorted"]
|
| 60 |
+
|
| 61 |
}
|
| 62 |
|
| 63 |
+
# Initialize
|
| 64 |
categories_keywords = categories_keywords_tfi
|
| 65 |
|
| 66 |
def categorize_question(question, categories_keywords):
|