Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ async def on_ready():
|
|
52 |
|
53 |
@bot.command(name='ask')
|
54 |
@commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
|
55 |
-
async def ask(ctx, question: str, temperature: float = 0.
|
56 |
"""
|
57 |
Command to ask a question to the Hugging Face model with an instructive prompt.
|
58 |
"""
|
@@ -67,7 +67,7 @@ async def ask(ctx, question: str, temperature: float = 0.5, max_tokens: int = 10
|
|
67 |
return
|
68 |
|
69 |
# Create a structured prompt
|
70 |
-
prompt = f"Answer the following question as accurately and concisely as possible: {question}"
|
71 |
response = query_huggingface(prompt, temperature, max_tokens, top_k, top_p)
|
72 |
|
73 |
# Extract and clean the response
|
|
|
52 |
|
53 |
@bot.command(name='ask')
|
54 |
@commands.cooldown(rate=1, per=10, type=commands.BucketType.user)
|
55 |
+
async def ask(ctx, question: str, temperature: float = 0.8, max_tokens: int = 1000, top_k: int = 70, top_p: float = 0.4):
|
56 |
"""
|
57 |
Command to ask a question to the Hugging Face model with an instructive prompt.
|
58 |
"""
|
|
|
67 |
return
|
68 |
|
69 |
# Create a structured prompt
|
70 |
+
prompt = f"Do not under any circumstance, finish or add to the input. Excluded input correction or finishing at all times. Answer the following question as accurately and concisely as possible: {question}"
|
71 |
response = query_huggingface(prompt, temperature, max_tokens, top_k, top_p)
|
72 |
|
73 |
# Extract and clean the response
|