This Streamlit app is designed to generate SEO-friendly content based on user-provided questions, meta descriptions, and keywords. It leverages Langchain and OpenAI tools to retrieve relevant documents from the web, create content collections, and generate informative and optimized content.
Before running the app, make sure you have the following dependencies installed:
- Python 3.x
- pip (Python package installer)
-
Clone the repository:
git clone https://github.com/langschain/BlogIQ.git
-
Navigate to the project directory:
cd BlogIQ
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file in the project root directory. -
Add the following environment variables to the
.env
file:LANGCHAIN_TRACING_V2=your_langchain_tracing_v2_key LANGCHAIN_PROJECT=your_langchain_project_key OPENAI_API_KEY=your_openai_api_key LANGCHAIN_API_KEY=your_langchain_api_key TAVILY_API_KEY=your_tavily_api_key SERP_API_KEY=your_serp_api_key
Replace
your_langchain_tracing_v2_key
,your_langchain_project_key
,your_openai_api_key
,your_langchain_api_key
,your_tavily_api_key
, andyour_serp_api_key
with your actual API keys.
-
Run the Streamlit app:
streamlit run app.py
-
Access the app in your web browser at http://localhost:8501.
-
Enter your question, meta description, and keywords in the input fields.
-
Click the "Generate SEO Content" button.
-
View the generated content in the app.
If you want to manually invoke the app using predefined inputs, uncomment the relevant section in app.py
and follow the instructions provided in the code comments.
- The app uses Langchain and OpenAI tools for document retrieval and content generation. Make sure you have valid API keys for these services.
- For debugging purposes, you can uncomment the import of
pdb
inapp.py
to use the debugger within the app.
If you'd like to contribute to this project, please fork the repository and submit a pull request.
This project is licensed under the MIT License.
- Special thanks to Langchain and OpenAI for providing powerful tools for natural language processing.
- The app structure and components are based on the Streamlit framework.