Spaces:
Configuration error
Configuration error
π AI Auto-Post Generator
Aplikasi Python untuk generate konten social media secara otomatis menggunakan AI - lengkap dengan gambar dan caption!
β¨ Features
- π¨ AI Image Generation: Generate gambar menggunakan Stable Diffusion (FLUX.1-schnell)
- βοΈ AI Caption Generation: Buat caption menarik menggunakan Llama 3.3 70B
- π± Multi-Platform Support: Instagram, Twitter, Facebook, LinkedIn
- π Multiple Styles: Realistic, Artistic, Minimalist, Vintage
- π¬ Multiple Tones: Friendly, Professional, Casual, Inspiring, Funny
- πΎ Post Management: Save, view, dan manage posts yang sudah dibuat
- π Web Interface: Gradio-based UI yang user-friendly
π― Use Cases
- Content Creator: Buat konten harian dengan cepat
- Social Media Manager: Manage multiple akun dengan efisien
- Small Business: Generate marketing content tanpa desainer
- Agency: Automate content creation untuk klien
π Quick Start
1. Local Development
# Clone repository
git clone <your-repo-url>
cd ai-autopost-generator
# Install dependencies
pip install -r requirements.txt
# Run aplikasi
python app.py
Buka browser ke http://localhost:7860
2. Deploy ke Hugging Face Spaces
Cara 1: Via Web Interface
- Buka Hugging Face Spaces
- Klik "Create new Space"
- Pilih "Gradio" sebagai SDK
- Upload file:
app.pyrequirements.txtREADME.md
- Space akan auto-deploy!
Cara 2: Via Git
# Install Hugging Face CLI
pip install huggingface_hub
# Login
huggingface-cli login
# Clone space
git clone https://huggingface.co/spaces/YOUR_USERNAME/ai-autopost-generator
cd ai-autopost-generator
# Copy files
cp app.py requirements.txt README.md ./
# Commit dan push
git add .
git commit -m "Initial commit"
git push
π Cara Pakai
1. Generate Post Baru
- Masuk ke tab "π Buat Post Baru"
- Isi Tema/Topik Post, contoh:
- "Kopi pagi yang sempurna untuk memulai hari"
- "Tips produktivitas untuk remote worker"
- "Sunset di pantai Bali"
- Pilih Platform target (Instagram, Twitter, Facebook, LinkedIn)
- Pilih Tone Caption:
- Friendly: Ramah dan hangat
- Professional: Formal dan informatif
- Casual: Santai dan natural
- Inspiring: Motivasi dan inspiratif
- Funny: Lucu dan menghibur
- Pilih Style Gambar:
- Realistic: Photorealistic
- Artistic: Digital art, vibrant
- Minimalist: Clean dan modern
- Vintage: Retro dan nostalgic
- Centang "Auto-generate gambar" jika ingin AI buat gambar
- Klik "π¨ Generate Post"
2. Review & Edit
- Gambar akan muncul di sebelah kanan
- Caption akan generate otomatis sesuai platform
- Edit caption jika perlu sebelum posting
3. Manage Posts
- Lihat daftar posts di tab "π Daftar Posts"
- Refresh untuk update list
- Hapus semua posts jika perlu reset
π§ Tech Stack
- Frontend: Gradio 4.0+
- AI Models:
- Image: FLUX.1-schnell (Stable Diffusion)
- Text: Llama 3.3 70B Instruct
- Hosting: Hugging Face Spaces
- Storage: JSON file-based storage
π‘ Monetization Ideas
1. Freemium Model
Free Tier:
- 5 posts per month
- Basic AI models
- Standard quality images
Pro Tier ($9.99/month):
- Unlimited posts
- Premium AI models
- High quality images
- Scheduling feature
- Analytics
Enterprise ($49.99/month):
- Multi-user access
- API access
- Custom branding
- Priority support
2. API Access
# Contoh API pricing
- Basic: $0.10 per image + caption
- Volume: $0.05 per image + caption (1000+ per month)
- Enterprise: Custom pricing
3. White Label Solution
- Jual ke agency ($499 one-time + $99/month)
- Custom domain dan branding
- Unlimited client access
4. Add-on Services
- Custom model training: $299 per brand
- Content calendar planning: $49/month
- Multi-account management: $19/month
π¨ Customization
Tambah Platform Baru
Edit di app.py:
platform_guides = {
"instagram": "Caption Instagram (maks 2200 karakter)...",
"tiktok": "Caption TikTok (singkat, engaging, with hashtags)", # Add new
# ...
}
Tambah Style Gambar
style_prompts = {
"realistic": "photorealistic, detailed, high quality",
"cyberpunk": "cyberpunk, neon lights, futuristic, sci-fi", # Add new
# ...
}
Ganti AI Model
# Untuk image generation
image = client.text_to_image(
full_prompt,
model="stabilityai/stable-diffusion-xl-base-1.0" # Change model
)
# Untuk caption generation
response = client.chat_completion(
messages=messages,
model="mistralai/Mixtral-8x7B-Instruct-v0.1" # Change model
)
π Environment Variables
Untuk production, set environment variables:
# Hugging Face Token (optional, untuk rate limit lebih tinggi)
export HF_TOKEN=your_hf_token_here
Update di app.py:
client = InferenceClient(token=os.getenv("HF_TOKEN"))
π Fitur Lanjutan (Coming Soon)
- Auto-scheduling posts
- Integration dengan social media APIs
- Analytics & performance tracking
- A/B testing untuk caption
- Multi-image carousel support
- Video generation
- Brand voice customization
- Collaboration features
π Troubleshooting
Error: Model overloaded
Solution: Retry setelah beberapa detik. Hugging Face Inference API kadang busy.
Error: Token limit exceeded
Solution: Gunakan HF token dengan rate limit lebih tinggi
Gambar tidak muncul
Solution: Check koneksi internet dan status Hugging Face API
π License
MIT License - Feel free to use untuk project komersial!
π€ Contributing
Pull requests are welcome! Untuk perubahan besar, open issue dulu.
π§ Contact
- Issues: GitHub Issues
- Email: your-email@example.com
π Star History
Jika project ini membantu, berikan β di GitHub!
Built with β€οΈ using Gradio and Hugging Face