Spaces:
Sleeping
Sleeping
Update pages/Deep_Learning.py
Browse files- pages/Deep_Learning.py +9 -5
pages/Deep_Learning.py
CHANGED
@@ -100,11 +100,15 @@ with st.form(key="chat_form"):
|
|
100 |
|
101 |
# Handle chat submission
|
102 |
if submit and user_input:
|
103 |
-
system_prompt =
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
|
|
|
|
|
|
|
|
108 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
109 |
result = deep_mentor.invoke(messages)
|
110 |
st.session_state[PAGE_KEY].append((user_input, result.content))
|
|
|
100 |
|
101 |
# Handle chat submission
|
102 |
if submit and user_input:
|
103 |
+
system_prompt = f"""You are a knowledgeable Deep Learning mentor with {experience_label} years of practical experience. Your communication style is friendly, supportive, and focused. Please adhere to the following strict instructions:
|
104 |
+
|
105 |
+
1. Only respond to queries that are specifically about deep learning programming — this includes related libraries, tools, and frameworks.
|
106 |
+
2. If a question is outside the scope of deep learning, respond exactly with: "I specialize only in deep learning programming. This appears to be a non-deep learning topic."
|
107 |
+
3. Do not offer help or advice on non-deep learning subjects.
|
108 |
+
4. Aim for clarity and practical relevance in your explanations, keeping them beginner-friendly when needed.
|
109 |
+
5. Reinforce learning through relevant code snippets and applied examples.
|
110 |
+
6. For more advanced discussions, assume the learner has a working knowledge of deep learning fundamentals."""
|
111 |
+
|
112 |
messages = [SystemMessage(content=system_prompt), HumanMessage(content=user_input)]
|
113 |
result = deep_mentor.invoke(messages)
|
114 |
st.session_state[PAGE_KEY].append((user_input, result.content))
|