careioPost / README.md
kadalicious22's picture
Upload 3 files
bb24fec verified

πŸš€ 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

  1. Content Creator: Buat konten harian dengan cepat
  2. Social Media Manager: Manage multiple akun dengan efisien
  3. Small Business: Generate marketing content tanpa desainer
  4. 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

  1. Buka Hugging Face Spaces
  2. Klik "Create new Space"
  3. Pilih "Gradio" sebagai SDK
  4. Upload file:
    • app.py
    • requirements.txt
    • README.md
  5. 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

  1. Masuk ke tab "πŸ“ Buat Post Baru"
  2. Isi Tema/Topik Post, contoh:
    • "Kopi pagi yang sempurna untuk memulai hari"
    • "Tips produktivitas untuk remote worker"
    • "Sunset di pantai Bali"
  3. Pilih Platform target (Instagram, Twitter, Facebook, LinkedIn)
  4. Pilih Tone Caption:
    • Friendly: Ramah dan hangat
    • Professional: Formal dan informatif
    • Casual: Santai dan natural
    • Inspiring: Motivasi dan inspiratif
    • Funny: Lucu dan menghibur
  5. Pilih Style Gambar:
    • Realistic: Photorealistic
    • Artistic: Digital art, vibrant
    • Minimalist: Clean dan modern
    • Vintage: Retro dan nostalgic
  6. Centang "Auto-generate gambar" jika ingin AI buat gambar
  7. 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

🌟 Star History

Jika project ini membantu, berikan ⭐ di GitHub!


Built with ❀️ using Gradio and Hugging Face