RajputVansh commited on
Commit
402763b
Β·
verified Β·
1 Parent(s): abbaf87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +192 -79
app.py CHANGED
@@ -354,103 +354,216 @@ with gr.Blocks(title="AI Marketing Content Generator") as demo:
354
  # Instructions Tab (First)
355
  with gr.TabItem("πŸ“– Quick Start"):
356
  gr.Markdown("""
357
- ## πŸš€ Get Started in 3 Steps
 
358
 
359
- 1. **Wait for Connection** βœ… (Status shown above)
360
- 2. **Pick a Tab** β†’ Choose what you need to create
361
- 3. **Generate** β†’ Enter details and click generate
362
 
363
- ### 🎯 What Each Tab Does:
364
- - **πŸ–ΌοΈ Single Image**: Create one professional marketing image
365
- - **πŸ”„ A/B Testing**: Generate variations to test what works best
366
- - **πŸ“± Social Media**: Create multiple platform-sized images at once
367
- - **πŸ€– AI Assistant**: Let AI write the perfect prompt for you
368
- """)
369
-
370
- with gr.Accordion("πŸ“š Detailed Guide & Tips", open=False):
371
- gr.Markdown("""
372
- ## Welcome to AI Marketing Content Generator!
373
-
374
- This tool helps you create professional marketing images using AI. Here's how to use each feature:
375
 
376
- ### πŸš€ Quick Start Guide
 
377
 
378
- 1. **Wait for Connection**: The status above should show "βœ… Connected" before you start
379
- 2. **Choose Your Task**: Select a tab based on what you need
380
- 3. **Enter Details**: Fill in the prompts and settings
381
- 4. **Generate**: Click the generate button and wait for results
 
382
 
383
- ### πŸ“‘ Feature Overview
 
384
 
385
- #### 1️⃣ Single Image Tab
386
- - **Best for**: Individual marketing assets, blog headers, social posts
387
- - **How to use**:
388
- 1. Enter a descriptive prompt
389
- 2. Choose a style preset (optional)
390
- 3. Adjust quality with steps (higher = better but slower)
391
- 4. Click Generate
392
 
393
- #### 2️⃣ A/B Testing Batch Tab
394
- - **Best for**: Creating variations to test engagement
395
- - **How to use**:
396
- 1. Enter your base prompt
397
- 2. Select how many variations (2-5)
398
- 3. Generate and compare results
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
399
 
400
- #### 3️⃣ Social Media Pack Tab
401
- - **Best for**: Multi-platform campaigns
402
- - **How to use**:
403
- 1. Enter your content prompt
404
- 2. Check the platforms you need
405
- 3. Generate all sizes at once
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
406
 
407
- #### 4️⃣ Prompt Templates Tab
408
- - **Best for**: Quick professional prompts
409
- - **How to use**:
410
- 1. Select a template type
411
- 2. Fill in the required variables
412
- 3. Apply template
413
- 4. Use the generated prompt
414
 
415
- ### πŸ’‘ Pro Tips
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
- - **Be Specific**: "Product photo of red shoes on white background" > "shoes"
418
- - **Use Styles**: Apply style presets for consistent branding
419
- - **Higher Steps**: Use 70-100 steps for final production images
420
- - **Test First**: Use lower steps (30-40) for quick tests
421
- - **Save Prompts**: Keep successful prompts for future use
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
 
423
- ### 🎯 Common Use Cases
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
424
 
425
- 1. **E-commerce Product Photos**
426
- ```
427
- Prompt: "Professional product photography of [product], white background, studio lighting"
428
- Style: professional
429
- Steps: 70
430
- ```
431
 
432
- 2. **Social Media Announcements**
433
- ```
434
- Prompt: "Eye-catching announcement graphic for [event/sale], bold colors"
435
- Style: playful
436
- Steps: 50
437
- ```
438
 
439
- 3. **Blog Headers**
440
- ```
441
- Prompt: "Minimalist header image about [topic], modern design"
442
- Style: minimalist
443
- Steps: 50
444
- ```
445
 
446
- ### ⚠️ Troubleshooting
447
 
448
- - **"Not Connected" Error**: Wait 10 seconds and refresh the page
449
- - **Timeout Errors**: The GPU might be cold starting, try again
450
- - **Poor Quality**: Increase steps to 70+ for better results
451
- - **Wrong Style**: Make sure to select style before generating
452
  """)
453
-
454
  # Single Image Generation Tab
455
  with gr.TabItem("πŸ–ΌοΈ Single Image"):
456
  with gr.Row():
 
354
  # Instructions Tab (First)
355
  with gr.TabItem("πŸ“– Quick Start"):
356
  gr.Markdown("""
357
+ # πŸš€ Welcome to AI Marketing Content Generator!
358
+ ### Create professional marketing images in minutes - no design skills needed!
359
 
360
+ ---
 
 
361
 
362
+ ## ⚑ Get Started in 3 Simple Steps
 
 
 
 
 
 
 
 
 
 
 
363
 
364
+ ### Step 1: βœ… Check Connection
365
+ Look at the status above - wait for "βœ… Connected" before starting
366
 
367
+ ### Step 2: 🎯 Choose What You Need
368
+ - **πŸ–ΌοΈ Single Image** β†’ One perfect marketing image
369
+ - **πŸ”„ A/B Testing** β†’ Multiple versions to see what works best
370
+ - **πŸ“± Social Media** β†’ Images sized for different platforms
371
+ - **πŸ€– AI Assistant** β†’ Let AI write the perfect prompt for you
372
 
373
+ ### Step 3: 🎨 Create & Download
374
+ Enter your details, click generate, and download your professional images!
375
 
376
+ ---
377
+ """)
 
 
 
 
 
378
 
379
+ # Beginner-friendly feature breakdown
380
+ with gr.Row():
381
+ with gr.Column():
382
+ gr.Markdown("""
383
+ ## πŸ–ΌοΈ Single Image
384
+ **Perfect for beginners!**
385
+
386
+ ✨ **What it does:** Creates one professional marketing image
387
+
388
+ 🎯 **Best for:**
389
+ - Blog post headers
390
+ - Social media posts
391
+ - Product announcements
392
+ - Website banners
393
+
394
+ πŸ’‘ **How to use:**
395
+ 1. Describe what you want
396
+ 2. Pick a style (optional)
397
+ 3. Click "Generate Image"
398
+
399
+ **Example:** "Professional photo of a coffee cup on wooden table"
400
+ """)
401
+
402
+ with gr.Column():
403
+ gr.Markdown("""
404
+ ## πŸ”„ A/B Testing Batch
405
+ **For optimizing performance**
406
+
407
+ ✨ **What it does:** Creates 2-5 different versions to test
408
+
409
+ 🎯 **Best for:**
410
+ - Finding what your audience likes
411
+ - Improving engagement rates
412
+ - Testing different approaches
413
+
414
+ πŸ’‘ **How to use:**
415
+ 1. Describe your content idea
416
+ 2. Choose testing strategy
417
+ 3. Post each version and see which performs best
418
+
419
+ **Example:** Test different colors for your sale announcement
420
+ """)
421
 
422
+ with gr.Row():
423
+ with gr.Column():
424
+ gr.Markdown("""
425
+ ## πŸ“± Social Media Pack
426
+ **Multi-platform made easy**
427
+
428
+ ✨ **What it does:** Creates perfectly sized images for each platform
429
+
430
+ 🎯 **Best for:**
431
+ - Cross-platform campaigns
432
+ - Consistent branding
433
+ - Saving time
434
+
435
+ πŸ’‘ **How to use:**
436
+ 1. Describe your content
437
+ 2. Check platforms you need
438
+ 3. Get all sizes at once
439
+
440
+ **Platforms:** Instagram, Twitter, LinkedIn, Facebook, YouTube
441
+ """)
442
+
443
+ with gr.Column():
444
+ gr.Markdown("""
445
+ ## πŸ€– AI Assistant
446
+ **Let AI do the thinking**
447
+
448
+ ✨ **What it does:** Writes professional prompts for you
449
+
450
+ 🎯 **Best for:**
451
+ - When you're not sure how to describe what you want
452
+ - Getting professional results
453
+ - Learning better prompting
454
+
455
+ πŸ’‘ **How to use:**
456
+ 1. Tell AI what you're creating in plain English
457
+ 2. AI writes the perfect prompt
458
+ 3. Generate your image
459
+
460
+ **Example Input:** "I need a hero image for my water bottle business"
461
+ """)
462
 
463
+ gr.Markdown("---")
 
 
 
 
 
 
464
 
465
+ # Practical examples section
466
+ with gr.Accordion("🎯 Real-World Examples", open=False):
467
+ gr.Markdown("""
468
+ ## See What You Can Create
469
+
470
+ ### πŸ›οΈ E-commerce Business Owner
471
+ **Need:** Product photos for online store
472
+ **Use:** Single Image tab
473
+ **Prompt:** "Professional product photography of [your product], white background, studio lighting"
474
+ **Result:** Clean, professional product images
475
+
476
+ ### πŸ“± Social Media Manager
477
+ **Need:** Content that gets engagement
478
+ **Use:** A/B Testing tab
479
+ **Prompt:** "Eye-catching announcement for Black Friday sale"
480
+ **Result:** 3-5 different versions to test which gets more likes/shares
481
+
482
+ ### 🏒 Small Business Owner
483
+ **Need:** Content for multiple platforms
484
+ **Use:** Social Media Pack tab
485
+ **Prompt:** "Grand opening celebration announcement"
486
+ **Result:** Perfect sizes for Instagram, Facebook, Twitter, LinkedIn
487
+
488
+ ### πŸ€” First-Time User
489
+ **Need:** Not sure how to describe what you want
490
+ **Use:** AI Assistant tab
491
+ **Input:** "I need marketing images for my yoga studio"
492
+ **Result:** AI creates perfect prompts for you
493
+ """)
494
 
495
+ # Success tips
496
+ with gr.Accordion("πŸ’‘ Tips for Amazing Results", open=False):
497
+ gr.Markdown("""
498
+ ## Make Your Images Stand Out
499
+
500
+ ### βœ… Do This:
501
+ - **Be specific:** "Red sports car in garage" vs "car"
502
+ - **Mention the mood:** "professional," "fun," "elegant"
503
+ - **Include details:** "wooden background," "bright lighting"
504
+ - **Use style presets:** They make everything look more professional
505
+
506
+ ### ❌ Avoid This:
507
+ - Vague descriptions like "nice image"
508
+ - Too many conflicting ideas in one prompt
509
+ - Forgetting to mention important details
510
+
511
+ ### 🎨 Style Guide:
512
+ - **Professional:** For business, corporate, formal content
513
+ - **Playful:** For fun brands, kids products, casual content
514
+ - **Minimalist:** For clean, modern, simple designs
515
+ - **Luxury:** For high-end products, premium brands
516
+ - **Tech:** For software, apps, modern technology
517
+
518
+ ### ⚑ Speed vs Quality:
519
+ - **Quick test:** 30-40 steps (faster, good for trying ideas)
520
+ - **Final image:** 70-100 steps (slower, best quality)
521
+ """)
522
 
523
+ # Troubleshooting section
524
+ with gr.Accordion("πŸ”§ Common Issues & Solutions", open=False):
525
+ gr.Markdown("""
526
+ ## Troubleshooting Guide
527
+
528
+ ### ❗ "MCP Server not connected"
529
+ **Solution:** Wait 10-15 seconds after opening the app, then refresh the page
530
+
531
+ ### ❗ "Timeout" errors
532
+ **Solution:** The AI might be starting up - wait 30 seconds and try again
533
+
534
+ ### ❗ Image quality is poor
535
+ **Solution:** Increase the "Quality" slider to 70+ steps
536
+
537
+ ### ❗ Image doesn't match what I wanted
538
+ **Solution:**
539
+ - Be more specific in your description
540
+ - Try the AI Assistant tab for better prompts
541
+ - Use style presets
542
+
543
+ ### ❗ Generation is too slow
544
+ **Solution:** Lower the quality steps to 30-40 for faster results
545
+
546
+ ### πŸ’¬ Still need help?
547
+ - Check if your internet connection is stable
548
+ - Try refreshing the page
549
+ - Make sure you're being specific in your prompts
550
+ """)
551
 
552
+ gr.Markdown("""
553
+ ---
 
 
 
 
554
 
555
+ ## πŸš€ Ready to Start?
 
 
 
 
 
556
 
557
+ 1. **Check the connection status** at the top of the page
558
+ 2. **Choose a tab** based on what you need to create
559
+ 3. **Start with simple prompts** and experiment
560
+ 4. **Have fun creating!** 🎨
 
 
561
 
562
+ ---
563
 
564
+ ### 🎯 Pro Tip for Beginners
565
+ Start with the **πŸ€– AI Assistant** tab if you're unsure - it will guide you through creating the perfect prompt!
 
 
566
  """)
 
567
  # Single Image Generation Tab
568
  with gr.TabItem("πŸ–ΌοΈ Single Image"):
569
  with gr.Row():