SocialGenius AI
Transform Your Content into Viral Social Media Posts
SocialGenius AI is a powerful Django-based web application that automatically generates professional, platform-optimized social media content using Google's Gemini AI. Simply upload an image, video, or text, and get ready-to-post content for all major social media platforms including YouTube, Instagram, Facebook, LinkedIn, Twitter, TikTok, and Pinterest.
β¨ Features
π€ AI-Powered Content Generation
- Image Analysis: Upload any image and get detailed descriptions
- Video Processing: Extract frames and transcribe audio with Whisper
- Text Optimization: Transform plain text into engaging social posts
π± Multi-Platform Support
| Platform | Content Generated |
|---|---|
| YouTube | SEO Title + Description + Tags |
| Engaging Caption + 30+ Hashtags | |
| Shareable Post + Hashtags | |
| Professional Post + Industry Hashtags | |
| Twitter/X | Short Punchy Tweet + Trending Hashtags |
| TikTok | Viral-Style Caption + Trending Tags |
| SEO-Optimized Title + Description |
π― Key Capabilities
- β Real-time AI processing using Google Gemini API
- β Smart content detection (digital marketing, Islamic content, nature, business, food, fitness, travel, technology, education)
- β Automatic hashtag generation with trending tags
- β One-click copy for all platform content
- β Bulk export functionality
- β Responsive design for all devices
- β Rate limit handling with user-friendly error messages
- β Video transcription using OpenAI Whisper
π Quick Start
Prerequisites
- Python 3.10 or higher
- FFmpeg (for video processing)
- Google Gemini API Key
Installation
Clone the repository
git clone https://github.com/yourusername/socialgenius-ai.git cd socialgenius-aiCreate virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies
pip install -r requirements.txt
- Install FFmpeg
- Windows: Download from ffmpeg.org and add to PATH
- Mac:
brew install ffmpeg Linux:
sudo apt-get install ffmpegConfigure API Key
In settings.py
GEMINI_API_KEY = 'your-gemini-api-key-here' GEMINI_MODEL = 'gemini-1.5-flash'
- Run migrations
python manage.py migrate
- Start the server
python manage.py runserver
- Open your browser
π§Configuration
Settings Configuration
settings.py
Google Gemini API
GEMINI_API_KEY = 'your-api-key' GEMINI_MODEL = 'gemini-1.5-flash' # or 'gemini-1.5-pro'
Media files
MEDIA_URL = '/media/' MEDIA_ROOT = BASE_DIR / 'media'
Session (no database required)
SESSION_ENGINE = 'django.contrib.sessions.backends.file'
### Environment Variables (Recommended)
Create a `.env` file:
```env
GEMINI_API_KEY=your-api-key-here
GEMINI_MODEL=gemini-1.5-flash
DEBUG=True
SECRET_KEY=your-secret-key
π―Usage Guide
1. Upload Content
- Image: Upload JPG, PNG (up to 10MB)
- Video: Upload MP4, MOV (up to 100MB)
- Text: Enter plain text directly
2. AI Processing
The system will:
- Analyze your content using Gemini Vision
- Extract text from images automatically
- Transcribe audio from videos using Whisper
- Detect content category (marketing, Islamic, nature, etc.)
3. Get Results
Receive platform-optimized content including:
- Engaging captions and descriptions
- SEO-friendly titles
- Relevant hashtags
- Professional formatting for each platform
4. Export
- Copy individual sections
- Copy all content at once
- Save as PDF
π§ͺ Testing
Test with Sample Texts
Digital Marketing Course: "Master SEO, Social Media, and Content Marketing in 30 days! Early bird discount available."
Test with Images
Upload images containing:
- Digital marketing infographics
- Islamic/Ramadan quotes
- Nature landscapes
- Food photography
- Business presentations
Test with Videos
Upload short videos (1-3 minutes) with clear audio for best results.
π API Reference
Gemini Vision API Integration
Image analysis endpoint
POST /process/ Content-Type: multipart/form-data
Parameters:
- content_type: 'image' | 'video' | 'text'
- image: file (for image type)
- video: file (for video type)
- text_content: string (for text type)
Response: Redirects to results page with generated content
Error Codes
| Code | Description |
|---|---|
| RATE_LIMIT | API rate limit exceeded |
| AUTH_ERROR | Invalid or expired API key |
| SERVICE_UNAVAILABLE | Gemini API service down |
| TIMEOUT | Request timeout |
| CONNECTION_ERROR | Network connection issue |
| GENERATION_FAILED | Content generation failed |
4. Module Import Errors
pip install --upgrade pip pip install -r requirements.txt --force-reinstall
π¦ Dependencies
Core Dependencies
- Django 4.2.11 - Web framework
- transformers 4.36.0 - AI models
- torch 2.1.2 - PyTorch backend
- openai-whisper - Audio transcription
- Pillow - Image processing
- opencv-python - Video frame extraction
- google-generativeai - Gemini API
Full requirements.txt
Django==4.2.11 transformers==4.36.0 torch==2.1.2 torchvision==0.16.2 torchaudio==2.1.2 accelerate==0.25.0 Pillow==10.1.0 opencv-python==4.8.1.78 openai-whisper==20231117 requests==2.31.0 google-generativeai==0.3.2 numpy==1.24.3 tiktoken==0.5.0 timm==0.9.8 einops==0.7.0
π€ Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
Development Guidelines
- Follow PEP 8 style guide
- Add docstrings for new functions
- Test with sample content before submitting
- Update documentation as needed
π License
MIT License - feel free to use, modify, and distribute.
π Acknowledgments
- Google Gemini AI - Vision and text generation
- OpenAI Whisper - Audio transcription
- Hugging Face - Transformers library
- Django - Web framework
β Support
If you find this project helpful, please give it a star on GitHub!
π Version History
v1.0.0 (Current)
- Initial release
- Multi-platform support
- Gemini AI integration
- Video processing with Whisper
- Rate limit handling
- Professional UI/UX
Planned Features
- Multi-language support
- Custom brand voice training
- Analytics dashboard
- Bulk content generation
- Social media scheduling integration
π Notes
- No database required - Uses Django sessions
- Privacy focused - Files are deleted after processing
- Free tier friendly - Optimized API usage
- CPU compatible - Works without GPU
Made with β€οΈ using Django, Gemini AI, and Whisper

Log in or sign up for Devpost to join the conversation.