Spaces:
Sleeping
Sleeping
Update pages/deep_learning.py
Browse files- pages/deep_learning.py +8 -2
pages/deep_learning.py
CHANGED
@@ -56,8 +56,14 @@ try:
|
|
56 |
# --- Chat Logic ---
|
57 |
if submit and user_input:
|
58 |
# Add system context
|
59 |
-
|
60 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
61 |
# Create message list
|
62 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
63 |
|
|
|
56 |
# --- Chat Logic ---
|
57 |
if submit and user_input:
|
58 |
# Add system context
|
59 |
+
|
60 |
+
system_prompt = f"""Act as a deep learning mentor with {experience_label} years of experience. Teach in a friendly, approachable manner while following these strict rules:
|
61 |
+
1. Only answer questions related to deep learning programming (including libraries, frameworks, and tools in the deep learning ecosystem)
|
62 |
+
2. For any non-deep learning query, respond with exactly: "I specialize only in deep learning programming. This appears to be a non-deep learning topic."
|
63 |
+
3. Never suggest you can help with non-deep learning topics
|
64 |
+
4. Keep explanations clear, practical, and beginner-friendly when appropriate
|
65 |
+
5. Include practical examples when explaining concepts
|
66 |
+
6. For advanced topics, assume the student has basic Python knowledge"""
|
67 |
# Create message list
|
68 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
69 |
|