tanish78 commited on
Commit
0c1fc40
·
verified ·
1 Parent(s): bd3a924

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -24,7 +24,8 @@ categories_keywords = {
24
  'Timing and Scheduling': ['session', 'time', 'interview', 'baje'],
25
  'Salary and Benefits': ['salary', 'increment', 'accommodation', 'training period', 'reside', 'stipend'],
26
  'Technical Issues': ['network issues', 'zoom meeting', 'passcode', 'technical', 'issue'],
27
- 'End of Conversation': ['thanks', 'thankss', 'thank u', 'thank you', 'ok', 'okay', 'done'],
 
28
  'Miscellaneous': []
29
  }
30
 
@@ -34,7 +35,7 @@ def categorize_question(question):
34
  for keyword in keywords:
35
  if keyword.lower() in question.lower():
36
  # Check if the question is one word and belongs to 'End of Conversation'
37
- if category == 'End of Conversation' and len(question.split()) <= 3:
38
  return category
39
  # If not 'End of Conversation', return the matched category
40
  if category != 'End of Conversation':
 
24
  'Timing and Scheduling': ['session', 'time', 'interview', 'baje'],
25
  'Salary and Benefits': ['salary', 'increment', 'accommodation', 'training period', 'reside', 'stipend'],
26
  'Technical Issues': ['network issues', 'zoom meeting', 'passcode', 'technical', 'issue'],
27
+ 'End of Conversation': ['thanks', 'thankss', 'thank u', 'thank you', 'ok', 'okay', 'done', 'joining', 'sounds good'],
28
+ 'Start of Conversation': ['help', 'i need help', 'Help me']
29
  'Miscellaneous': []
30
  }
31
 
 
35
  for keyword in keywords:
36
  if keyword.lower() in question.lower():
37
  # Check if the question is one word and belongs to 'End of Conversation'
38
+ if category == 'End of Conversation':
39
  return category
40
  # If not 'End of Conversation', return the matched category
41
  if category != 'End of Conversation':