Spaces:
Sleeping
Sleeping
ruchi
commited on
Commit
·
9809cd8
1
Parent(s):
e9b921a
Fix the text description
Browse files
app.py
CHANGED
@@ -100,9 +100,8 @@ if submit_button:
|
|
100 |
proposal = '''Given proposal is for the city {} with product {}. The propsal is as below.
|
101 |
{}'''
|
102 |
proposal = proposal.format(selectedCity, selectedProduct, userProposal)
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
topMoneyNeeds, topMoneyNeedsDict = findTop3MoneyNeeds(moneyNeeds)
|
107 |
|
108 |
topCustomerExp, topCustomerExpDict = findTop3CustomerExperienceNeeds(customerExperience)
|
@@ -112,24 +111,28 @@ if submit_button:
|
|
112 |
matchingTopologies, topologyDetails = findTop3Topologies(proposal, demographic)
|
113 |
|
114 |
response = model.generate_content([pre_prompt.format(proposal)])
|
115 |
-
|
116 |
-
st.write("
|
|
|
|
|
|
|
|
|
117 |
|
118 |
for idx, need in enumerate(topMoneyNeeds):
|
119 |
st.write("{}. {}".format(idx+1, need))
|
120 |
|
121 |
-
st.write("As
|
122 |
|
123 |
for idx, exp in enumerate(topCustomerExp):
|
124 |
st.write("{}. {}".format(idx+1, exp))
|
125 |
|
126 |
-
st.write("As
|
127 |
|
128 |
for idx, need in enumerate(topSustainabilityNeeds):
|
129 |
st.write("{}. {}".format(idx+1, need))
|
130 |
|
131 |
|
132 |
-
st.write("
|
133 |
|
134 |
for idx, topology in enumerate(matchingTopologies):
|
135 |
st.write("{}. {}".format(idx+1, topology))
|
@@ -197,7 +200,7 @@ if submit_button:
|
|
197 |
st.write(" Total Subscriber takeout = {}".format(subscriberTakeOut))
|
198 |
|
199 |
if totalSubscriberTakeOut<subscriberTakeOut:
|
200 |
-
st.write("
|
201 |
elif totalSubscriberTakeOut==subscriberTakeOut:
|
202 |
st.write("Great Job !! Your proposition exactly match the target subscriber take out.")
|
203 |
else:
|
|
|
100 |
proposal = '''Given proposal is for the city {} with product {}. The propsal is as below.
|
101 |
{}'''
|
102 |
proposal = proposal.format(selectedCity, selectedProduct, userProposal)
|
103 |
+
|
104 |
+
|
|
|
105 |
topMoneyNeeds, topMoneyNeedsDict = findTop3MoneyNeeds(moneyNeeds)
|
106 |
|
107 |
topCustomerExp, topCustomerExpDict = findTop3CustomerExperienceNeeds(customerExperience)
|
|
|
111 |
matchingTopologies, topologyDetails = findTop3Topologies(proposal, demographic)
|
112 |
|
113 |
response = model.generate_content([pre_prompt.format(proposal)])
|
114 |
+
|
115 |
+
st.write("{} city people are mainly from the {} group with a population of {}. Out of this {} of perople belong to this group".format(selectedCity, matchingTopologies[0], population, topologyDetails[matchingTopologies[0]]['Proportion Sample']))
|
116 |
+
st.write("Entered proposal:", proposal)
|
117 |
+
st.write("Analyzing your proposition")
|
118 |
+
|
119 |
+
st.write("As for the money needs of this group your product is mostly targeting people with the spending behaviour described below:")
|
120 |
|
121 |
for idx, need in enumerate(topMoneyNeeds):
|
122 |
st.write("{}. {}".format(idx+1, need))
|
123 |
|
124 |
+
st.write("As for the customer experience needs of this group your product is mostly targeting people with the spending behaviour described below:",)
|
125 |
|
126 |
for idx, exp in enumerate(topCustomerExp):
|
127 |
st.write("{}. {}".format(idx+1, exp))
|
128 |
|
129 |
+
st.write("As for the sustainability needs of this group your product is mostly targeting people with the spending behaviour described below:",)
|
130 |
|
131 |
for idx, need in enumerate(topSustainabilityNeeds):
|
132 |
st.write("{}. {}".format(idx+1, need))
|
133 |
|
134 |
|
135 |
+
st.write("Overall your targeted demographic and proposition are focusing the three topologies below. The figures show the weighting of your proposition to each demographic:",)
|
136 |
|
137 |
for idx, topology in enumerate(matchingTopologies):
|
138 |
st.write("{}. {}".format(idx+1, topology))
|
|
|
200 |
st.write(" Total Subscriber takeout = {}".format(subscriberTakeOut))
|
201 |
|
202 |
if totalSubscriberTakeOut<subscriberTakeOut:
|
203 |
+
st.write("Overall there is not a close match of your proposition to the main demographic. Takeout score difference = {}".format(subscriberTakeOut-totalSubscriberTakeOut))
|
204 |
elif totalSubscriberTakeOut==subscriberTakeOut:
|
205 |
st.write("Great Job !! Your proposition exactly match the target subscriber take out.")
|
206 |
else:
|