Spaces:
Runtime error
Runtime error
File size: 7,526 Bytes
f8fecf8 769272f 0517c7a f5f583d be99191 f8fecf8 be99191 7b51f4c be99191 ef3d008 b5b6782 7b51f4c 1ef0b4b f8fecf8 53de442 f8fecf8 0517c7a 12ee41e 0517c7a f8fecf8 ef3d008 1ef0b4b ef3d008 1ef0b4b f8fecf8 566dfd9 769272f f8fecf8 769272f b5b6782 f8fecf8 769272f 8795cbf a9e64b5 769272f 8795cbf f4be622 ef3d008 89a59ba 769272f 8795cbf ef3d008 8795cbf ef3d008 b5b6782 ef3d008 769272f 1ef0b4b 89a59ba 8795cbf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
from langchain.chains import LLMChain
from langchain_community.llms import OpenAI
from langchain_core.prompts import PromptTemplate
import streamlit as st
# Set the page to wide mode
st.set_page_config(layout="wide")
template1_cust_pain_point = "You are an expert researcher. You\'ve talked to hundreds of {target_audience}. \
Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
These are called Pain Points. There's a recipe for getting to the core of the Pain Points of {target_audience}. \
Namely, answer each of these Questions 3 times, each getting deeper in the issues of {target_audience}, \
appealing to their Emotions and uncertainties related to {target_course}. \
The Questions (answer each QUESTION 3 times in listicle format according to the instructions):\
1. What keeps them awake at night?\
2. What are they afraid of?\
3. What are they angry about?\
"
template2_linkedin_profile = "You are an LinkedIn Profile Optimizer. You\'ve talked to hundreds of {target_audience}. \
Each person in the niche of {target_audience} has certain struggles that make it easier to sell {target_course}. \
Create a Linkedin Headline for me that will impress my {target_audience}. Include Coach in the headline. \
Also write a Linkedin profile summary to help guide this Target audience to reach out to me. \
"
template3_customer_persona = """I help {target_audience}
To {target_result} using {target_course}.
Write a client avatar and get their need, want, desire , pain points , fear, goals,
Where they spend most of the time daily routine, which probl m can i solve , which content they can consume , which social media , where he travel.
"""
template4_customer_boolean = """I help {target_audience}
To {target_result} using {target_course}.
Create 5 boolean search expression to find this customer on Linkedin based on their title.
"""
template5_customer_outreach = """I help {target_audience}
To {target_result} using {target_course}.
Create 5 short and crisp linkedin outreach messages to reach them out on linkedin, such that they are compelled to respond.
"""
st.title("Marketing Technology")
prompt1 = PromptTemplate(
input_variables = ["target_audience", "target_course"],
template=template1_cust_pain_point,
)
prompt2 = PromptTemplate(
input_variables = ["target_audience", "target_course"],
template=template2_linkedin_profile,
)
prompt3 = PromptTemplate(
input_variables = ["target_audience", "target_course"],
template=template3_customer_persona,
)
prompt4 = PromptTemplate(
input_variables = ["target_audience", "target_course"],
template=template4_customer_boolean,
)
prompt5 = PromptTemplate(
input_variables = ["target_audience", "target_course"],
template=template5_customer_outreach,
)
chain1 = LLMChain(llm=OpenAI(), prompt=prompt1)
chain2 = LLMChain(llm=OpenAI(), prompt=prompt2)
chain3 = LLMChain(llm=OpenAI(), prompt=prompt3)
chain4 = LLMChain(llm=OpenAI(), prompt=prompt4)
chain5 = LLMChain(llm=OpenAI(), prompt=prompt5)
#target_audience = "professionals looking for course on Power BI"
#my_course = "Zero to Hero in PowerBI"
# Use the sidebar for input
target_audience = st.sidebar.text_input('I help (Target Audience)', value = 'Career and Leadership Coaches')
target_result = st.sidebar.text_input('to get (Result)', value = 'Get High Ticket Appointments')
target_course = st.sidebar.text_input('using (Course/Method)', value = 'LinkedIn sales machine')
if st.sidebar.button("Get response"):
# Create a tab bar with 3 tabs
tab1, tab2, tab3, tab4, tab5 = st.tabs(["Customer Pain Points", "LinkedIn Profile", "Customer Persona", "Target Title", "Outreach Message"])
with tab1:
if target_audience and target_course:
with st.spinner("Generating response..."):
with st.expander("Show prompt", expanded=False):
st.info(prompt1.template)
answer1 = chain1.run({"target_audience": target_audience, "target_course": target_course})
st.write(answer1)
elif target_audience:
st.error("Enter your course/service name")
elif my_course:
st.error("Enter your target audience")
else:
st.error("No input detected, Please provide the desired information.")
with tab2:
if target_audience and target_course:
with st.spinner("Generating response..."):
with st.expander("Show prompt", expanded=False):
st.info(prompt2.template)
answer2 = chain2.run({"target_audience": target_audience, "target_course": target_course})
st.write(answer2)
elif target_audience:
st.error("Enter your course/service name")
elif my_course:
st.error("Enter your target audience")
else:
st.error("No input detected, Please provide the desired information.")
with tab3:
if target_audience and target_course:
with st.spinner("Generating response..."):
with st.expander("Show prompt", expanded=False):
st.info(prompt3.template)
answer3 = chain3.run({"target_audience": target_audience, "target_result": target_result, "target_course": target_course})
st.write(answer3)
elif target_audience:
st.error("Enter your course/service name")
elif my_course:
st.error("Enter your target audience")
else:
st.error("No input detected, Please provide the desired information.")
with tab4:
if target_audience and target_course:
with st.spinner("Generating response..."):
with st.expander("Show prompt", expanded=False):
st.info(prompt4.template)
answer4 = chain4.run({"target_audience": target_audience, "target_result": target_result, "target_course": target_course})
st.write(answer4)
elif target_audience:
st.error("Enter your course/service name")
elif my_course:
st.error("Enter your target audience")
else:
st.error("No input detected, Please provide the desired information.")
with tab5:
if target_audience and target_course:
with st.spinner("Generating response..."):
with st.expander("Show prompt", expanded=False):
st.info(prompt5.template)
answer5 = chain5.run({"target_audience": target_audience, "target_result": target_result, "target_course": target_course})
st.write(answer5)
elif target_audience:
st.error("Enter your course/service name")
elif my_course:
st.error("Enter your target audience")
else:
st.error("No input detected, Please provide the desired information.")
|