SweetBot,py
SweetBot,py
# Example list of adult content-related words (you can expand this list)
adult_keywords = ["explicit", "porn", "adult", "sexual", "nudity", "swearword1",
"swearword2"]
while True:
user_input = input("You: ")
if user_input.lower() == 'quit':
break
# Check if the input contains adult content based on the user role
if user_role == "user" and contains_adult_content(user_input):
print("SweetBot: I'm sorry, I can't respond to that. Adult content is
restricted.")
else:
response = sweetbot.get_response(user_input)
print(f"SweetBot: {response}")
if __name__ == "__main__":
chat()