Update app.py
Browse files
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 |
-
|
|
|
358 |
|
359 |
-
|
360 |
-
2. **Pick a Tab** β Choose what you need to create
|
361 |
-
3. **Generate** β Enter details and click generate
|
362 |
|
363 |
-
|
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 |
-
###
|
|
|
377 |
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
|
|
382 |
|
383 |
-
###
|
|
|
384 |
|
385 |
-
|
386 |
-
|
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 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
399 |
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
|
407 |
-
|
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
416 |
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
|
423 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
424 |
|
425 |
-
|
426 |
-
|
427 |
-
Prompt: "Professional product photography of [product], white background, studio lighting"
|
428 |
-
Style: professional
|
429 |
-
Steps: 70
|
430 |
-
```
|
431 |
|
432 |
-
|
433 |
-
```
|
434 |
-
Prompt: "Eye-catching announcement graphic for [event/sale], bold colors"
|
435 |
-
Style: playful
|
436 |
-
Steps: 50
|
437 |
-
```
|
438 |
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
Steps: 50
|
444 |
-
```
|
445 |
|
446 |
-
|
447 |
|
448 |
-
|
449 |
-
|
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():
|