Spaces:
Sleeping
Sleeping
metadata
title: YouTube Automation Studio
emoji: π¬
colorFrom: red
colorTo: blue
sdk: docker
pinned: false
license: mit
app_port: 7860
π¬ YouTube Automation Studio
AI-powered automation tool for downloading Instagram Reels, generating metadata with Google Gemini AI, and uploading to YouTube automatically.
β¨ Features
- π₯ Instagram Reel Downloader: Download Reels in HD quality with original audio
- π€ AI Metadata Generator: Generate SEO-optimized titles, descriptions, tags using Google Gemini 2.0
- π€ YouTube Auto Uploader: Upload directly to YouTube with automated metadata
- π΅ Video Editor: Add background music and text overlays to videos
- π Multi-User Support: Each user has their own isolated YouTube authentication
π Quick Start
Set Environment Variables (Required):
GEMINI_API_KEY: Get from Google AI StudioIG_SESSIONID: Instagram session cookie (see below)SECRET_KEY: Generate withpython -c "import secrets; print(secrets.token_hex(32))"
Upload client_secret.json:
- Create OAuth credentials in Google Cloud Console
- Enable YouTube Data API v3
- Download and upload
client_secret.jsonas a secret file
Access the app and start automating!
π Getting Instagram Session ID
- Open Instagram in Chrome
- Press
F12β Application β Cookies β instagram.com - Find
sessionidcookie and copy its value - Add to Space secrets as
IG_SESSIONID
π― Usage
- Sign in with YouTube (OAuth 2.0 - secure & one-time)
- Paste Instagram Reel URL
- (Optional) Add video editing:
- Background music from YouTube or local file
- Text overlays with custom positioning
- AI generates metadata (title, description, tags, hashtags)
- Video uploads to YouTube automatically
π οΈ Tech Stack
- Backend: Flask, Python 3.11, Gunicorn
- AI: Google Gemini 2.0 Flash
- APIs: YouTube Data API v3, Instagram
- Video Processing: MoviePy, OpenCV, FFmpeg
- Auth: OAuth 2.0, Session-based authentication
π Environment Variables
Set these in your Hugging Face Space settings:
ENVIRONMENT=production
GEMINI_API_KEY=your-gemini-api-key-here
IG_SESSIONID=your-instagram-sessionid-here
SECRET_KEY=your-secret-key-here
π Security
- OAuth 2.0 for YouTube authentication
- Session-based user isolation
- Secure cookie handling
- No password storage
- Automatic credential refresh
π OAuth Redirect URI
Add this to your Google Cloud OAuth credentials: