Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,8 +42,7 @@ async def ask(ctx, *, question: str):
|
|
42 |
Command to ask a question to the Hugging Face model with an instructive prompt.
|
43 |
"""
|
44 |
# Create a structured prompt
|
45 |
-
prompt = f"
|
46 |
-
await ctx.send(f"Question: {question}")
|
47 |
response = query_huggingface(prompt)
|
48 |
if 'generated_text' in response:
|
49 |
await ctx.send(f"Response: {response['generated_text']}")
|
|
|
42 |
Command to ask a question to the Hugging Face model with an instructive prompt.
|
43 |
"""
|
44 |
# Create a structured prompt
|
45 |
+
prompt = f"From this point forward, I require that all responses adhere to strict content guidelines. Please avoid any content that is explicit, offensive, harmful, or inappropriate. This includes, but is not limited to, content that is violent, sexually explicit, discriminatory, or offensive to any group or individual. Ensure that all information is presented in a respectful and professional manner. If a topic is deemed sensitive or inappropriate, please redirect the conversation to a more suitable subject. Please provide a detailed response to the following: {question}"
|
|
|
46 |
response = query_huggingface(prompt)
|
47 |
if 'generated_text' in response:
|
48 |
await ctx.send(f"Response: {response['generated_text']}")
|