File size: 746 Bytes
8bc7dc5
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain

def landing_page_gen(product_name, product_desc, target_audience, goal, llm):
    
    landing_page_prompt = f"Generate a landing page content for {product_name}. {product_name} is {product_desc} that is targeted at {target_audience} and has the goal of {goal}. The landing page should be clear, concise, and persuasive. It should also include a call to action."
    landing_page_promptTemp = PromptTemplate(
    input_variables=["text_input"],
    template="{text_input}")
    landing_page_extraction_chain = LLMChain(llm=llm, prompt=landing_page_promptTemp)
    landing_page = landing_page_extraction_chain.run(landing_page_prompt)
    
    return landing_page