debisoft commited on
Commit
a5041f8
·
1 Parent(s): 512ab02

prompt_template

Browse files
Files changed (1) hide show
  1. app.py +26 -1
app.py CHANGED
@@ -45,7 +45,32 @@ Format your response as a JSON object with \
45
 
46
  Text sample: '''{input}'''
47
  """
48
- response = get_completion(prompt)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  return json.dumps(response)
50
 
51
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")
 
45
 
46
  Text sample: '''{input}'''
47
  """
48
+
49
+ sys_msg="You are demanding customer."
50
+
51
+ instruction = """\\n\
52
+ Determine the product or solution, the problem being solved, features, target customer that are being discussed in the \
53
+ following user prompt. State if you would use this product and elaborate on why. Also state if you would pay for it and elaborate on why.\
54
+ Finally, state if you would invest in it and elaborate on why.\\n\
55
+ \\n\
56
+ Give a score for the product. Format your response as a JSON object with \
57
+ 'solution', 'problem', 'features', 'target_customer', 'fg_will_use', 'reason_to_use', 'fg_will_pay', 'reason_to_pay', 'fg_will_invest', 'reason_to_invest', 'score' as the keys.\\n\
58
+ """
59
+
60
+ prompt_template = f"""\\n\
61
+ Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\\n\
62
+ \\n\
63
+ ### Instruction:\\n\
64
+ {sys_msg}\\n\
65
+ {instruction}\\n\
66
+ \\n\
67
+ ### Input:\\n\
68
+ {input}\\n\
69
+ \\n\
70
+ ### Response:\\n\
71
+ """
72
+
73
+ response = get_completion(prompt_template)
74
  return json.dumps(response)
75
 
76
  #iface = gr.Interface(fn=greet, inputs="text", outputs="text")