Kakaarot commited on
Commit
b879067
·
verified ·
1 Parent(s): bc5db28

improved the prompts

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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, e.g., if the prompt is 'The dog barked,' respond like 'The dog barked so loud, it woke the moon—and now it is howling back!'",
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. For example, if the prompt is 'The future of AI,' discuss ethical implications and technical challenges in 2-3 sentences.",
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. For instance, if the prompt is 'The river flows,' respond with 'The river flows, a silver thread, / Through emerald dreams where silence tread.'"
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)