Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -46,8 +46,8 @@ def chat_with_rezAi(message, history):
|
|
46 |
lower_msg = message.lower()
|
47 |
|
48 |
for phrase in blocked_words:
|
49 |
-
|
50 |
-
|
51 |
|
52 |
prompt = (
|
53 |
"<|start_header_id|>system<|end_header_id|>\n"
|
|
|
46 |
lower_msg = message.lower()
|
47 |
|
48 |
for phrase in blocked_words:
|
49 |
+
if re.search(rf"\b{re.escape(phrase)}\b", lower_msg):
|
50 |
+
return "I'm not able to respond to that. Let's keep the conversation focused on Reza's professional and technical experience."
|
51 |
|
52 |
prompt = (
|
53 |
"<|start_header_id|>system<|end_header_id|>\n"
|