app.py
CHANGED
@@ -56,7 +56,7 @@ I am building an online community to help people to find dates.
|
|
56 |
{{"solution": "FindDates.com", "problem": "finding a date", "features": "online community to help people find dates", "target_customer": "people looking for a date", "fg_will_use": "True", "reason_to_use": "I am looking for an online community to help people find dates. FindDates.com meets my needs and I would use it to find my next great date.","fg_will_pay": "True", "reason_to_pay": "I would not pay for it as I am looking for an online community to help people find dates. But for products related to dating, paying for it would be a no-brainer.","fg_will_invest": "False", "reason_to_invest": "There are many online dating platforms already.","score": "40"}}
|
57 |
"""
|
58 |
|
59 |
-
def extract_json(gen_text, n_shot_learning=0
|
60 |
if(n_shot_learning == -1) :
|
61 |
start_index = 0
|
62 |
else :
|
@@ -129,7 +129,7 @@ Give a score for the product. Format your response as a JSON object with \
|
|
129 |
print(total_prompt)
|
130 |
response = get_completion(total_prompt)
|
131 |
gen_text = response["choices"][0]["text"]
|
132 |
-
return json.dumps(extract_json(gen_text, -1
|
133 |
|
134 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
135 |
#iface.launch()
|
|
|
56 |
{{"solution": "FindDates.com", "problem": "finding a date", "features": "online community to help people find dates", "target_customer": "people looking for a date", "fg_will_use": "True", "reason_to_use": "I am looking for an online community to help people find dates. FindDates.com meets my needs and I would use it to find my next great date.","fg_will_pay": "True", "reason_to_pay": "I would not pay for it as I am looking for an online community to help people find dates. But for products related to dating, paying for it would be a no-brainer.","fg_will_invest": "False", "reason_to_invest": "There are many online dating platforms already.","score": "40"}}
|
57 |
"""
|
58 |
|
59 |
+
def extract_json(gen_text, response, n_shot_learning=0):
|
60 |
if(n_shot_learning == -1) :
|
61 |
start_index = 0
|
62 |
else :
|
|
|
129 |
print(total_prompt)
|
130 |
response = get_completion(total_prompt)
|
131 |
gen_text = response["choices"][0]["text"]
|
132 |
+
return json.dumps(extract_json(gen_text, response, -1))
|
133 |
|
134 |
#iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
135 |
#iface.launch()
|