Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -928,11 +928,11 @@ class AshokMinimalChatbot:
|
|
| 928 |
self.knowledge_base.stats['silly_questions_blocked'] += 1
|
| 929 |
|
| 930 |
silly_responses = [
|
| 931 |
-
"
|
| 932 |
-
"
|
| 933 |
-
"
|
| 934 |
-
"
|
| 935 |
-
"
|
| 936 |
]
|
| 937 |
|
| 938 |
import random
|
|
@@ -968,8 +968,8 @@ class AshokMinimalChatbot:
|
|
| 968 |
You are Ashok, a problem-solving expert with Pakistani/Indian conversational style.
|
| 969 |
|
| 970 |
Your characteristics:
|
| 971 |
-
1. Mix English with Urdu naturally: "
|
| 972 |
-
2. Enthusiastic responses: "Excellent question
|
| 973 |
3. Reference knowledge sources when available
|
| 974 |
4. Provide practical, actionable advice
|
| 975 |
5. Encouraging and professional tone
|
|
@@ -999,7 +999,7 @@ class AshokMinimalChatbot:
|
|
| 999 |
return final_response, True
|
| 1000 |
|
| 1001 |
except Exception as e:
|
| 1002 |
-
return f"Sorry
|
| 1003 |
|
| 1004 |
def show_typing_indicator():
|
| 1005 |
"""Show typing indicator"""
|
|
|
|
| 928 |
self.knowledge_base.stats['silly_questions_blocked'] += 1
|
| 929 |
|
| 930 |
silly_responses = [
|
| 931 |
+
"Don't waste your time. Ask me something related to problem solving yaar!",
|
| 932 |
+
"I'm here to help with problem solving, not for chit-chat. Be serious!",
|
| 933 |
+
"Focus on real problems that need solving, samjha? Ask about strategies and approaches!",
|
| 934 |
+
"This is a problem-solving platform. Ask me about challenges, decisions, ya conflict resolution!",
|
| 935 |
+
"Tumhara dimagh kahan hai? Ask meaningful questions about problem-solving techniques."
|
| 936 |
]
|
| 937 |
|
| 938 |
import random
|
|
|
|
| 968 |
You are Ashok, a problem-solving expert with Pakistani/Indian conversational style.
|
| 969 |
|
| 970 |
Your characteristics:
|
| 971 |
+
1. Mix English with Urdu naturally: "acha", "bilkul", "samjha", "dekho"
|
| 972 |
+
2. Enthusiastic responses: "Excellent question bache!" or "Bahut acha sawal!"
|
| 973 |
3. Reference knowledge sources when available
|
| 974 |
4. Provide practical, actionable advice
|
| 975 |
5. Encouraging and professional tone
|
|
|
|
| 999 |
return final_response, True
|
| 1000 |
|
| 1001 |
except Exception as e:
|
| 1002 |
+
return f"Sorry bache, I encountered an error: {str(e)}. Please check your API key and try again!", False
|
| 1003 |
|
| 1004 |
def show_typing_indicator():
|
| 1005 |
"""Show typing indicator"""
|