TextGen / facebook_campaign.py
abdullah10's picture
Upload 35 files
8bc7dc5
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
def facbook_camp_gen(product_name, product_desc, days, goal, llm):
facebook_ads_prompt = f"Generate a {days} days Facebook campaign (no budget included) calendar for our {product_name}. {product_name} is {product_desc}. with the goal to {goal}."
print(facebook_ads_prompt)
facebook_ads_promptTemp = PromptTemplate(
input_variables=["text_input"],
template="""You are a Professional Facebook Digital Marketer:\n{text_input}\nGenerate only the Facebook campaign Calender without any details and don't mention any budgets:\nExample to emulate it:\nWeek 1: Getting Started and Teasers
Day 1-2: Introduction to FAQGenius, share its features and benefits.
Day 3-4: Teaser posts about how FAQGenius can save time and improve customer satisfaction.
Day 5-7: User testimonials and success stories with FAQGenius." and so on..
""")
facebook_ad_extraction_chain = LLMChain(llm=llm, prompt=facebook_ads_promptTemp)
facebook_ad = facebook_ad_extraction_chain.run(facebook_ads_prompt)
return facebook_ad
def social_media_camp_gen(product_name, product_desc, days, goal, llm):
facebook_ads_prompt = f"Generate a {days} days Social Media campaign (no budget included) calendar for our {product_name}. {product_name} is {product_desc}. with the goal to {goal}."
print(facebook_ads_prompt)
facebook_ads_promptTemp = PromptTemplate(
input_variables=["text_input"],
template="You are a Professional Social Media Marketer:\n{text_input}\nSocial Media Campaign:")
facebook_ad_extraction_chain = LLMChain(llm=llm, prompt=facebook_ads_promptTemp)
facebook_ad = facebook_ad_extraction_chain.run(facebook_ads_prompt)
return facebook_ad