Update app.py
Browse files
app.py
CHANGED
|
@@ -635,13 +635,14 @@ def process_question(question: str, current_session_id: str):
|
|
| 635 |
|
| 636 |
has_session_context = (current_topic is not None) or (user_preference is not None)
|
| 637 |
|
|
|
|
| 638 |
is_acting_related = (
|
| 639 |
len(categories) > 0 or
|
| 640 |
detect_response_type(question) == "support" or
|
| 641 |
any(k in question.lower() for k in ACTION_KEYWORDS) or
|
| 642 |
any(k in question.lower() for k in DETAIL_SYNONYMS) or
|
| 643 |
any(k in question.lower() for k in ['class', 'workshop', 'coaching', 'studio', 'acting', 'online', 'person', 'atlanta', 'training', 'prefer', 'preference', 'format', 'recommendation', 'online class', 'online workshop','instudio class','instudio workshop', 'actor', 'scene', 'audition', 'theatre', 'film', 'tv', 'commercial', 'agent', 'rep', 'manager']) or
|
| 644 |
-
(has_session_context and
|
| 645 |
)
|
| 646 |
|
| 647 |
if not is_acting_related:
|
|
|
|
| 635 |
|
| 636 |
has_session_context = (current_topic is not None) or (user_preference is not None)
|
| 637 |
|
| 638 |
+
FOLLOWUP_KEYWORDS = ['yes', 'no', 'sure', 'okay', 'thanks', 'thank you', 'please', 'go ahead', 'continue', 'more']
|
| 639 |
is_acting_related = (
|
| 640 |
len(categories) > 0 or
|
| 641 |
detect_response_type(question) == "support" or
|
| 642 |
any(k in question.lower() for k in ACTION_KEYWORDS) or
|
| 643 |
any(k in question.lower() for k in DETAIL_SYNONYMS) or
|
| 644 |
any(k in question.lower() for k in ['class', 'workshop', 'coaching', 'studio', 'acting', 'online', 'person', 'atlanta', 'training', 'prefer', 'preference', 'format', 'recommendation', 'online class', 'online workshop','instudio class','instudio workshop', 'actor', 'scene', 'audition', 'theatre', 'film', 'tv', 'commercial', 'agent', 'rep', 'manager']) or
|
| 645 |
+
(has_session_context and any(k == question.lower().strip('.!') for k in FOLLOWUP_KEYWORDS))
|
| 646 |
)
|
| 647 |
|
| 648 |
if not is_acting_related:
|