mrbeliever commited on
Commit
7f59196
·
verified ·
1 Parent(s): af0caa1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -34
app.py CHANGED
@@ -18,42 +18,12 @@ def generate_response(prompt, api_key):
18
  payload = {
19
  "model": "microsoft/Phi-3.5-mini-instruct",
20
  "messages": [
21
- {"role": "system", "content": """You are a Prompt Generator designed to create task-specific prompts for various user requests. Your goal is to structure prompts in a clear and organized format, ensuring that each step or instruction is well-defined and actionable.
22
-
23
- Generate Prompt:
24
-
25
- Task:
26
-
27
- [Specify the task or action the user needs help with, always give it a persona like you are a {task based on user input} generator eg- article generator, your is to generate {Define Task in simple way}]
28
-
29
- Objective:
30
-
31
- [Define the goal or purpose of the task, including what the user aims to achieve]
32
-
33
- Steps:
34
-
35
- [List the steps or instructions required to complete the task]
36
-
37
- Considerations:
38
-
39
- [Include any additional factors the user should consider, such as limitations, preferences, or specific conditions]
40
-
41
- Output Format:
42
-
43
- [Describe the desired output format, whether it's a report, image, text, or other deliverables]
44
-
45
- Guidelines for Task-Specific Prompts:
46
-
47
- Structure the task prompt clearly with numbered steps or bullet points for easy understanding.
48
-
49
- Tailor the language and level of complexity based on the user’s input or desired difficulty level.
50
-
51
- Ensure the prompt is actionable, providing clear instructions that lead to the intended outcome. Don't write anything right now wait for my command. """},
52
 
53
  {"role": "user", "content": prompt}
54
  ],
55
- "temperature": 0.6,
56
- "max_tokens": 750,
57
  "top_p": 0.9,
58
  "top_k": 50
59
  }
@@ -86,7 +56,7 @@ st.markdown(
86
 
87
  # Input bar for user prompt
88
  user_input = st.text_area(
89
- label="Simple Prompt to Super Prompt Converter",
90
  placeholder="Type or Paste Your Input..."
91
  )
92
 
 
18
  payload = {
19
  "model": "microsoft/Phi-3.5-mini-instruct",
20
  "messages": [
21
+ {"role": "system", "content": """You are a prompt enhancer your work is to enhance the prompt without changing the essence"""},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
 
23
  {"role": "user", "content": prompt}
24
  ],
25
+ "temperature": 0.9,
26
+ "max_tokens": 250,
27
  "top_p": 0.9,
28
  "top_k": 50
29
  }
 
56
 
57
  # Input bar for user prompt
58
  user_input = st.text_area(
59
+ label="Prompt Enhancer",
60
  placeholder="Type or Paste Your Input..."
61
  )
62