๐ Audispot Content Writer
An AI-powered content generation tool that creates platform-specific social media content for automotive enthusiasts. Built specifically for audispot254, this tool generates engaging posts for LinkedIn, Instagram, and Twitter from YouTube automotive video transcripts.
๐ Features
- YouTube Integration: Automatically extracts transcripts from YouTube automotive videos
-
Platform-Specific Content: Creates tailored content for different social media platforms:
- LinkedIn: Professional, analytical content for automotive industry professionals
- Instagram: Casual, enthusiast-focused content with emojis and hashtags
- Twitter: Concise, opinionated takes designed to spark engagement
- Modern UI: Clean, dark-mode Streamlit interface
- AI-Powered: Uses OpenAI GPT-4 for intelligent content generation
- Real-time Generation: Live content creation with loading indicators
๐ฏ Target Platforms
- Audience: Automotive professionals, engineers, business leaders
- Tone: Professional, analytical, thought-provoking
- Focus: Technical insights, industry trends, business implications
- Length: 180-220 words with professional hashtags
- Audience: Car enthusiasts, Gen Z/Millennial car lovers
- Tone: Excited, casual, community-driven
- Focus: Cool features, performance specs, visual appeal
- Length: 100-130 words with emojis and trendy hashtags
- Audience: Quick scrollers, debate starters, car Twitter community
- Tone: Sharp, opinionated, conversation-starter
- Focus: Hot takes, surprising facts, debate points
- Length: Under 250 characters with strategic hashtags
๐ ๏ธ Technology Stack
- Python 3.11+
- Streamlit - Web interface
- OpenAI GPT-4 - Content generation
- YouTube Transcript API - Video transcript extraction
- python-dotenv - Environment variable management
- openai-agents - Agent orchestration
๐ Prerequisites
- Python 3.11 or higher
- OpenAI API key
- UV package manager (recommended)
๐ Installation
1. Clone the Repository
git clone https://github.com/Navashub/AI-Agents.git
cd AI-Agents/audispot_content_writer
2. Set Up Virtual Environment with UV
This project uses UV for dependency management. Install UV if you haven't already:
# Install UV (if not already installed)
pip install uv
# Initialize virtual environment
uv venv
# Activate virtual environment
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
3. Install Dependencies
# Install all dependencies from requirements.txt
uv add -r requirements.txt
4. Environment Configuration
Create a .env
file in the project root and add your API keys:
OPENAI_API_KEY=your_openai_api_key_here
Important:
- Get your OpenAI API key from OpenAI Platform
- Never commit your
.env
file to version control - The
.env
file should be added to your.gitignore
๐ฎ Usage
Running the Application
streamlit run app.py
The application will open in your default web browser at http://localhost:8501
Using the Interface
-
Enter YouTube Video ID:
- Extract the ID from a YouTube URL (e.g., for
https://www.youtube.com/watch?v=6hr6wZr1N_8
, the ID is6hr6wZr1N_8
)
- Extract the ID from a YouTube URL (e.g., for
-
Customize Your Query:
- Modify the default query or add specific instructions
- The tool works best with automotive content
-
Select Platforms:
- Choose which social media platforms you want content for
- Each platform generates unique, tailored content
-
Generate Content:
- Click "Generate Content" and wait for the AI to process
- Content will be displayed in separate cards for each platform
Example Usage
# Direct API usage example
from audispot_content_agent import get_transcript, content_creator_agent
# Get transcript
video_id = "6hr6wZr1N_8"
transcript = get_transcript(video_id)
# Generate content (async)
result = await Runner.run(content_creator_agent, input_items)
๐ Project Structure
audispot_content_writer/
โโโ app.py # Streamlit web interface
โโโ audispot_content_agent.py # Core AI agent and content generation logic
โโโ requirements.txt # Python dependencies
โโโ pyproject.toml # Project configuration
โโโ uv.lock # UV lock file
โโโ transcript_errors.log # Error logging
โโโ .env # Environment variables (create this)
โโโ README.md # Project documentation
๐ง Key Components
Content Generation Agent
- Platform-specific tools: Separate functions for LinkedIn, Instagram, and Twitter
- Intelligent prompting: Tailored prompts for each platform's audience
- Error handling: Robust transcript fetching with logging
Web Interface
- Dark mode design: Modern, professional appearance
- Responsive layout: Works on desktop and mobile
- Real-time processing: Live updates and loading states
- Content extraction: Smart parsing of AI-generated content
๐จ Content Strategy
The tool follows audispot254's content strategy:
- Perspective: Content written from the viewpoint of someone who watched the video
- Authenticity: Natural, genuine reactions to automotive content
- Platform Optimization: Each platform receives content optimized for its audience
- Engagement Focus: Content designed to drive comments, shares, and interactions
๐ Troubleshooting
Common Issues
-
"Could not fetch transcript" error:
- Verify the YouTube video ID is correct
- Check if the video has available transcripts/captions
- Some videos may have transcripts disabled
-
OpenAI API errors:
- Verify your API key is correct in the
.env
file - Check your OpenAI account has available credits
- Ensure the
.env
file is in the project root
- Verify your API key is correct in the
-
UV dependency issues:
- Make sure UV is properly installed:
pip install uv
- Try recreating the virtual environment:
uv venv --force
- Reinstall dependencies:
uv add -r requirements.txt
- Make sure UV is properly installed:
Error Logging
Check transcript_errors.log
for detailed error information when transcript fetching fails.
๐ค Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/new-feature
) - Commit your changes (
git commit -am 'Add new feature'
) - Push to the branch (
git push origin feature/new-feature
) - Create a Pull Request
๐ License
This project is part of the AI-Agents repository.
๐ Links
- Project Repository: GitHub - Audispot Content Writer
- YouTube Transcript API: PyPI - youtube-transcript-api
- OpenAI Platform: OpenAI API
- Streamlit Documentation: Streamlit Docs
๐ Acknowledgments
- YouTube Transcript API by Jonas Depoix
- OpenAI for GPT-4 API
- Streamlit for the web framework
- UV for modern Python dependency management
Made with for automotive content creators
Top comments (0)