見出し画像

ChatGPTにマンガを描かせる

ChatGPTに会計分析をさせる、学術論文を書かせる、マンガを描かせるに取り組んでいます。4コママンガを描かせる方法の途中経過です。


python
def generate_manga():
    panels = [
        {
            "title": "Panel 1",
            "description": "Character excitedly announces they’ll try a new activity. Show their hairstyle and outfit clearly.",
            "details": "Excited character, cheerful expression, clear hairstyle and outfit",
        },
        {
            "title": "Panel 2",
            "description": "Character struggles with the activity, creating a messy scene. Keep hairstyle and outfit consistent.",
            "details": "Struggling character, chaotic scene, consistent hairstyle and outfit",
        },
        {
            "title": "Panel 3",
            "description": "Character proudly admires their flawed attempt, confidently declaring success. Maintain the same look.",
            "details": "Proud character, flawed result, confident expression, same hairstyle and outfit",
        },
        {
            "title": "Panel 4",
            "description": "Disappointed with the outcome, the character admits they need improvement. Reflect elements from earlier panels for continuity.",
            "details": "Disappointed character, admits improvement needed, background elements consistent",
        },
    ]

    requirements = {
        "format": "Horizontal four-panel format",
        "style": "Consistent hairstyle and clothing, pastel colors",
        "tone": "Humorous, light-hearted",
        "character": "Japanese Anime girl",
    }

    for panel in panels:
        print(f"{panel['title']}: {panel['description']}")
        print(f"Details: {panel['details']}")
        print()

    print("Requirements:")
    for key, value in requirements.items():
        print(f"- {key}: {value}")

generate_manga()



この記事が気に入ったらサポートをしてみませんか?