improved the prompts
Browse files
app.py
CHANGED
|
@@ -64,9 +64,9 @@ def generate_text(prompt, tone, max_length, temperature=0.7, top_p=0.9, repetiti
|
|
| 64 |
# Adjust prompt based on tone
|
| 65 |
# And Bro believe me, Impact: Better prompts = better outputs = a stronger GSoC impression!
|
| 66 |
tone_prompts = {
|
| 67 |
-
"Funny": f"Generate a concise, humorous response to: {prompt}. Use witty wordplay, unexpected twists, or lighthearted exaggeration, avoiding offensive content. Aim for a punchline-style finish
|
| 68 |
-
"Serious": f"Provide a detailed, thoughtful, and professional response to: {prompt}. Offer logical reasoning, depth, and a formal tone, as if explaining to an expert audience.
|
| 69 |
-
"Poetic": f"Write a vivid, poetic response to: {prompt}. Use metaphor, rhythm, and imagery to create a lyrical flow, as if crafting a short verse.
|
| 70 |
}
|
| 71 |
# This creates a dictionary that holds different prompts based on the tone we pick, making sure the model knows how to respond.
|
| 72 |
input_text = tone_prompts.get(tone, prompt)
|
|
|
|
| 64 |
# Adjust prompt based on tone
|
| 65 |
# And Bro believe me, Impact: Better prompts = better outputs = a stronger GSoC impression!
|
| 66 |
tone_prompts = {
|
| 67 |
+
"Funny": f"Instruction: Generate a concise, humorous response to the following prompt. Prompt: {prompt}. Use witty wordplay, unexpected twists, or lighthearted exaggeration, avoiding offensive content. Aim for a punchline-style finish.",
|
| 68 |
+
"Serious": f"Instruction: Provide a detailed, thoughtful, and professional response to the following prompt. Prompt: {prompt}. Offer logical reasoning, depth, and a formal tone, as if explaining to an expert audience.",
|
| 69 |
+
"Poetic": f"Instruction: Write a vivid, poetic response to the following prompt. Prompt: {prompt}. Use metaphor, rhythm, and imagery to create a lyrical flow, as if crafting a short verse."
|
| 70 |
}
|
| 71 |
# This creates a dictionary that holds different prompts based on the tone we pick, making sure the model knows how to respond.
|
| 72 |
input_text = tone_prompts.get(tone, prompt)
|