debisoft commited on
Commit
a1eba99
1 Parent(s): 19990b8
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -90,8 +90,8 @@ def get_completion(prompt):
90
  return score_model(model_uri, databricks_token, prompt)
91
  #def get_completion(prompt):
92
 
93
- def greet(company, solution, target_customer, problem, features):
94
- customer_persona = target_customer
95
  pitch = f"""My company, {company} is developing {solution} to help {target_customer} {problem} with {features}"""
96
  input = pitch
97
 
@@ -124,5 +124,5 @@ Give a score for the product. Format your response as a JSON object with \
124
  gen_text = response["predictions"][0]["generated_text"]
125
  return json.dumps(extract_json(gen_text, 3))
126
 
127
- 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")
128
  iface.launch()
 
90
  return score_model(model_uri, databricks_token, prompt)
91
  #def get_completion(prompt):
92
 
93
+ def greet(company, solution, target_customer, problem, features, target_audience_persona="the target customer"):
94
+ customer_persona = target_audience_persona
95
  pitch = f"""My company, {company} is developing {solution} to help {target_customer} {problem} with {features}"""
96
  input = pitch
97
 
 
124
  gen_text = response["predictions"][0]["generated_text"]
125
  return json.dumps(extract_json(gen_text, 3))
126
 
127
+ 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"), gr.Textbox(label="Target Audience persona", lines=3)], outputs="json")
128
  iface.launch()