Spaces:
Runtime error
Runtime error
updated the openapi key
Browse files
app.py
CHANGED
|
@@ -284,24 +284,24 @@ campaign_types = [
|
|
| 284 |
target_variables = [
|
| 285 |
'conversion_rate',
|
| 286 |
'click_to_open_rate',
|
| 287 |
-
'Bounce Rate',
|
| 288 |
-
'Spam Complaint Rate',
|
| 289 |
-
'AOV',
|
| 290 |
-
'CLV',
|
| 291 |
-
'ROI',
|
| 292 |
-
'NPS',
|
| 293 |
-
'CAC',
|
| 294 |
-
'Abandonment Rate',
|
| 295 |
-
'Site Traffic',
|
| 296 |
-
'Product Return Rate',
|
| 297 |
-
'Net Profit Margin',
|
| 298 |
-
'MRR',
|
| 299 |
-
'ARR',
|
| 300 |
-
'Churn',
|
| 301 |
-
'ARPU',
|
| 302 |
-
'Retention Rate',
|
| 303 |
-
'Unsubscribe Rate',
|
| 304 |
-
'Email ROI'
|
| 305 |
]
|
| 306 |
|
| 307 |
uploaded_file = st.file_uploader(
|
|
@@ -525,7 +525,7 @@ if st.session_state.get('button') == True:
|
|
| 525 |
chars_out = dict(zip(chars, sel_var_values))
|
| 526 |
sorted_chars_out = sorted(chars_out.items(), key=lambda x: x[1], reverse=True)
|
| 527 |
prefrence_variables=["charcter counts: "+str(x)+", Target Rate: "+str(y) for x,y in zip(chars,sel_var_values)]
|
| 528 |
-
prefrence_variables=[None]+prefrence_variables
|
| 529 |
preference = st.selectbox(
|
| 530 |
'Please select your preferences for target metric',
|
| 531 |
prefrence_variables,
|
|
@@ -568,7 +568,7 @@ if st.session_state.get('button') == True:
|
|
| 568 |
else:
|
| 569 |
email_body_opt=email_body
|
| 570 |
if(preference is not ''):
|
| 571 |
-
st.markdown('##### preference is selected')
|
| 572 |
ai_generated_email=generate_example_email_with_context(email_body, campaign, industry, target, sorted_chars_out, preference)
|
| 573 |
email_body_opt=ai_generated_email
|
| 574 |
optimized_email, optimized_char_cnt, optimized_url_cnt = optimize_email_prompt_multi(email_body_opt, options)
|
|
|
|
| 284 |
target_variables = [
|
| 285 |
'conversion_rate',
|
| 286 |
'click_to_open_rate',
|
| 287 |
+
# 'Bounce Rate',
|
| 288 |
+
# 'Spam Complaint Rate',
|
| 289 |
+
# 'AOV',
|
| 290 |
+
# 'CLV',
|
| 291 |
+
# 'ROI',
|
| 292 |
+
# 'NPS',
|
| 293 |
+
# 'CAC',
|
| 294 |
+
# 'Abandonment Rate',
|
| 295 |
+
# 'Site Traffic',
|
| 296 |
+
# 'Product Return Rate',
|
| 297 |
+
# 'Net Profit Margin',
|
| 298 |
+
# 'MRR',
|
| 299 |
+
# 'ARR',
|
| 300 |
+
# 'Churn',
|
| 301 |
+
# 'ARPU',
|
| 302 |
+
# 'Retention Rate',
|
| 303 |
+
# 'Unsubscribe Rate',
|
| 304 |
+
# 'Email ROI'
|
| 305 |
]
|
| 306 |
|
| 307 |
uploaded_file = st.file_uploader(
|
|
|
|
| 525 |
chars_out = dict(zip(chars, sel_var_values))
|
| 526 |
sorted_chars_out = sorted(chars_out.items(), key=lambda x: x[1], reverse=True)
|
| 527 |
prefrence_variables=["charcter counts: "+str(x)+", Target Rate: "+str(y) for x,y in zip(chars,sel_var_values)]
|
| 528 |
+
# prefrence_variables=[None]+prefrence_variables
|
| 529 |
preference = st.selectbox(
|
| 530 |
'Please select your preferences for target metric',
|
| 531 |
prefrence_variables,
|
|
|
|
| 568 |
else:
|
| 569 |
email_body_opt=email_body
|
| 570 |
if(preference is not ''):
|
| 571 |
+
# st.markdown('##### preference is selected')
|
| 572 |
ai_generated_email=generate_example_email_with_context(email_body, campaign, industry, target, sorted_chars_out, preference)
|
| 573 |
email_body_opt=ai_generated_email
|
| 574 |
optimized_email, optimized_char_cnt, optimized_url_cnt = optimize_email_prompt_multi(email_body_opt, options)
|