app.py
CHANGED
@@ -19,7 +19,19 @@ def get_completion(prompt, model="gpt-3.5-turbo"):
|
|
19 |
|
20 |
def greet(company, solution, target_customer, problem, features):
|
21 |
pitch = f"""My company, {company} is developing {solution} to help {target_customer} {problem} with {features}"""
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Company"), gr.Textbox(label="Solution"), gr.Textbox(label="Customer"), gr.Textbox(label="Problem"), gr.Textbox(label="Feature")], outputs="json")
|
25 |
iface.launch()
|
|
|
19 |
|
20 |
def greet(company, solution, target_customer, problem, features):
|
21 |
pitch = f"""My company, {company} is developing {solution} to help {target_customer} {problem} with {features}"""
|
22 |
+
prompt = f"""
|
23 |
+
Determine the product or solution, the problem being solved, features, target customer that are being discussed in the \
|
24 |
+
following text, which is delimited by triple backticks. Then, pretend that you are the target customer. \
|
25 |
+
State if you would use this product and elaborate on why. Also state if you would pay for it and elaborate on why.\
|
26 |
+
Give a score for the product.
|
27 |
+
|
28 |
+
Format your response as a JSON object with \
|
29 |
+
'solution', 'problem', 'features', 'target_customer', 'fg_will_use', 'reason_to_use', 'fg_will_pay', 'reason_to_pay', 'score' as the keys.
|
30 |
+
|
31 |
+
Text sample: '''{pitch}'''
|
32 |
+
"""
|
33 |
+
response = get_completion(prompt)
|
34 |
+
return json.dumps(response)
|
35 |
|
36 |
iface = gr.Interface(fn=greet, inputs=[gr.Textbox(label="Company"), gr.Textbox(label="Solution"), gr.Textbox(label="Customer"), gr.Textbox(label="Problem"), gr.Textbox(label="Feature")], outputs="json")
|
37 |
iface.launch()
|