tanish78 commited on
Commit
cd9a49e
·
verified ·
1 Parent(s): 7a1753e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -13
app.py CHANGED
@@ -45,20 +45,8 @@ def categorize_question(question):
45
  # words to exclude from End Conversation
46
  exclusion_words = {'is', 'please', 'not resolved', 'unresolved', 'problem', 'help', 'issue', 'webinar', 'office', 'leave', 'approved', 'notice', 'period', 'good morning', 'when', 'where', 'why', 'how', 'which', 'and when'}
47
 
48
- # # Single word user query
49
- # if len(words) == 1:
50
- # single_word = words[0].lower()
51
- # # Check if the single word fits into any other category
52
- # for category, keywords in categories_keywords.items():
53
- # if any(single_word in keyword for keyword in keywords):
54
- # return category
55
-
56
- # if any(single_word in keyword for keyword in categories_keywords["End of Conversation"]):
57
- # return "End of Conversation"
58
- # else:
59
- # return "Miscellaneous"
60
 
61
- # Categorization of non-ending queries
62
  for category, keywords in categories_keywords.items():
63
  if any(keyword.lower() in question.lower() for keyword in keywords):
64
  return category
 
45
  # words to exclude from End Conversation
46
  exclusion_words = {'is', 'please', 'not resolved', 'unresolved', 'problem', 'help', 'issue', 'webinar', 'office', 'leave', 'approved', 'notice', 'period', 'good morning', 'when', 'where', 'why', 'how', 'which', 'and when'}
47
 
 
 
 
 
 
 
 
 
 
 
 
 
48
 
49
+ # Categorization
50
  for category, keywords in categories_keywords.items():
51
  if any(keyword.lower() in question.lower() for keyword in keywords):
52
  return category