Spaces:
Sleeping
Sleeping
metadata
title: Blog Generator
emoji: 🏢
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.43.1
app_file: app.py
pinned: false
license: mit
short_description: 'AI Blog generator with Openai and Groq support. '
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Deploying Your LangGraph Blog Generator
This guide will walk you through setting up and deploying your LangGraph blog generator application.
Prerequisites
- Python 3.9+ installed
- pip (Python package installer)
- Git (optional, for version control)
Step 1: Set Up Your Environment
First, create a project directory and set up a virtual environment:
# Create project directory
mkdir langgraph-blog-generator
cd langgraph-blog-generator
# Create and activate virtual environment
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
Step 2: Install Required Packages
Create a requirements.txt
file with the following content:
langchain
langchain-openai
langchain_groq
langgraph
pydantic
streamlit
python-dotenv
Install the packages:
pip install -r requirements.txt
Step 3: Configure Environment Variables
Create a .env
file in your project directory:
OPENAI_API_KEY=your_openai_api_key_here
Replace your_openai_api_key_here
with your actual OpenAI API key.
Step 4: Create the Application File
Create a file named app.py
and paste the code from the LangGraph Blog Generator code artifact.
Step 5: Run Locally
Test the application locally:
streamlit run app.py
Your browser should open automatically to http://localhost:8501
with the blog generator app running.
Step 6: Deployment
- Create a free account on hugginface
- Add requirements.txt
- Add the files to the spaces
- Build the dependencies
- Deploy the app
Alternatively, you can deploy to other platforms: