Update app.py
Browse files
app.py
CHANGED
|
@@ -29,9 +29,11 @@ Make sure the blog post is informative, engaging, and well-structured.
|
|
| 29 |
# Create a prompt template instance
|
| 30 |
blog_prompt_template = PromptTemplate(input_variables=["topic"], template=TEMPLATE)
|
| 31 |
|
| 32 |
-
#
|
| 33 |
-
blog_chain =
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
)
|
| 36 |
|
| 37 |
def generate_blog_post(topic: str) -> str:
|
|
|
|
| 29 |
# Create a prompt template instance
|
| 30 |
blog_prompt_template = PromptTemplate(input_variables=["topic"], template=TEMPLATE)
|
| 31 |
|
| 32 |
+
# Create the sequence of runnables
|
| 33 |
+
blog_chain = (
|
| 34 |
+
blog_prompt_template
|
| 35 |
+
| llm
|
| 36 |
+
| StrOutputParser()
|
| 37 |
)
|
| 38 |
|
| 39 |
def generate_blog_post(topic: str) -> str:
|