Langchain, OpenAI and Streamlit - Using Langchain & Streamlit to Build a Recipe Generator

BugBytes
BugBytes
9.2 هزار بار بازدید - پارسال - Blog Post:
Blog Post: https://bugbytes.io/posts/langchain-s...

In this video, we'll build a recipe generator app which allows users to enter a list of ingredients, and we use langchain to send requests to OpenAI to generate potential recipes based on that list of ingredients.

We will use Streamlit to build a small UI to enable users to enter ingredients, and then display the recipes returned by the language model.

We will see a few features of langchain in doing so, including PromptTemplate, LLMChain, and SequentialChain / SimpleSequentialChain objects

☕️ 𝗕𝘂𝘆 𝗺𝗲 𝗮 𝗰𝗼𝗳𝗳𝗲𝗲:
To support the channel and encourage new videos, please consider buying me a coffee here:
https://ko-fi.com/bugbytes

📌 𝗖𝗵𝗮𝗽𝘁𝗲𝗿𝘀:
00:00 Intro
00:38 Setting up environment for langchain
01:27 Creating langchain LLM for OpenAI queries
03:32 Creating langchain PromptTemplate objects for LLM prompt formatting
06:11 Building Streamlit UI to allow prompt creation
08:10 Creating LLMChain object for the meal planner
13:42 Creating a SimpleSequentialChain to chain the 2 LLMChains sequentially
16:42 Using SequentialChain to get outputs from both chains
19:21 Writing both outputs to streamlit columns

𝗦𝗼𝗰𝗶𝗮𝗹 𝗠𝗲𝗱𝗶𝗮:
📖 Blog: https://bugbytes.io/posts/langchain-s...
👾 Github: https://github.com/bugbytes-io/
🐦 Twitter: Twitter: bugbytesio

📚 𝗙𝘂𝗿𝘁𝗵𝗲𝗿 𝗿𝗲𝗮𝗱𝗶𝗻𝗴 𝗮𝗻𝗱 𝗶𝗻𝗳𝗼𝗿𝗺𝗮𝘁𝗶𝗼𝗻:
Blog: https://bugbytes.io/posts/langchain-s...
Langchain: https://docs.langchain.com/docs/
PromptTemplates: https://python.langchain.com/en/lates...
LLMChain and chains: https://python.langchain.com/en/lates...
Sequential Chains: https://python.langchain.com/en/lates...
OpenAI API Keys: https://platform.openai.com/account/a...

#python #streamlit #langchain  #datascience  #llm
پارسال در تاریخ 1402/03/22 منتشر شده است.
9,222 بـار بازدید شده
... بیشتر