jonathanjordan21 commited on
Commit
10ffaa0
1 Parent(s): ae861fe

Create caption_chain.py

Browse files
Files changed (1) hide show
  1. components/caption_chain.py +11 -0
components/caption_chain.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from langchain import PromptTemplate, LLMChain
2
+
3
+ def chain(llm):
4
+ template = """Make 5 different advertisement captions about this product.
5
+ {product}
6
+ """
7
+
8
+ prompt = PromptTemplate(template=template, input_variables=["product"])
9
+
10
+ llm_chain = LLMChain(prompt=prompt, llm=llm)
11
+ return llm_chain