TextGen / x_campaign_generation.py
abdullah10's picture
Upload 35 files
8bc7dc5
raw
history blame contribute delete
983 Bytes
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
def x_camp_gen(product_name, product_desc, goal, llm):
x_camp_prompt = f"Design a potent Twitter campaign for my product '{product_name}'. {product_name} is {product_desc} aiming to accomplish {goal} through the meticulous adoption of planning and content creation best practices.\n\nCampaign will include: Campaign Teaser, Educational Content Series, Customer Testimonials and Case Studies, Interactive Content, Limited-Time Offer Announcement, Call-to-Action for Consultation and Recap and Thank You."
print(x_camp_prompt)
x_camp_promptTemp = PromptTemplate(
input_variables=["text_input"],
template="You are a Specialist in Twitter Copywriting\n\n{text_input}\n\nMake the tweets engaging, creative and coherent")
x_camp_extraction_chain = LLMChain(llm=llm, prompt=x_camp_promptTemp)
x_camp = x_camp_extraction_chain.run(x_camp_prompt)
return x_camp