Summary Artwork with the AiConfig
Tags: ai, promptengineering, llm, learning
Published: 2023-12-10 11:14:23

## Background
Using DaLL for the creation of text to image is nothing new by now. However, building a creative or innovative AI artwork is quite challenging. Hence, the need to explore on various creative way of instructing the AI to generate the artwork. That's the birth of Summary AI Artwork.

## Use case

- Representation of inner feelings or thoughts by physically presenting with various bits and pieces of artwork in a single frame. The Summary based AI artwork is not just creative, but it can also serve as a means to represent the inner memory. 
- Show and tell scenario.

## Introduction
In this blog post, you will be guided with the real-world AI based application usage on how to build or create a summary based DaLL-3 text to image generation with ease. Building of creative AI artwork depends on various factors, imagination is the limit. The one who leverages the "AI" at its best will understand and produce better results.

For this purpose, we'll be making use of AiConig driven approach of [LastMileAI](https://lastmileai.dev/). If you are new to the LastMileAI or AiConfig, I request you to please read the following blogs

[Building with generative AI](https://dev.to/tanyarai/ditch-the-hassle-get-your-genai-code-productionized-now-3f2l)
[Prompt Chaining](https://dev.to/ranjancse/prompt-chaining-with-aiconfig-4afm)
[HumanAndAIConfig](https://dev.to/ranjancse/human-and-aiconfig-life-is-all-about-composition-i29)

## Hands-on

Now let's delve into the hands-on approach to generative, the most creative summary based AI artwork.

Before we take a deep dive into the Summary Generator based AI Artwork, there are some fundamentals that need to be understood well. 

- Generate 5 pair of sentences based on the `{{content}}` which are extraordinary for building the DaLL-E images. Please make sure to go with the step-by-step approach.

Note - The `{{content}}` is a placeholder parameter that we'll be using for generating the main theme for the AI artwork. We are going to call it as a seed.

![SummaryDaLLStep1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o2ykscaf78n9un9d8div.png)

Here's the response

![SummaryDaLLStep1Response](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kkhybrnkbahrn2aye1gb.png)

- The second step is the most crucial one, i.e. the summary generation aspect.

![SummaryGenerationOfText](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7mmekk9uzk6hvupgo8o.png)

- The third step is the most crucial one for building the AI artwork using DaLL-3 model.

![GenerateAIArtworkWithDaLL](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ez00zekze4hb31ad8jwc.png)

![FinalAIArtwork1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aja56ekouxhyboy1mwv3.png)

![FinalAIArtwork2](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqpjcfghvdjuv02y34hp.png)

Here's the AiConfig for your reference. Please copy the below config and save it on your local machine.

```
{
  "name": "Summary DaLL-E",
  "schema_version": "latest",
  "metadata": {
    "models": {
      "gpt-3.5-turbo": {
        "model": "gpt-3.5-turbo",
        "top_p": 1,
        "temperature": 1,
        "system_prompt": "You are an expert Artist",
        "presence_penalty": 0,
        "frequency_penalty": 0
      }
    },
    "parameters": {}
  },
  "prompts": [
    {
      "name": "seed",
      "input": "Generate 5 pair of sentences based on the {{content}} which are extraordinary for building the DaLL-E images. Please make sure to go with the step-by-step approach.",
      "metadata": {
        "model": {
          "name": "gpt-3.5-turbo",
          "settings": {}
        },
        "parameters": {
          "content": "A little girl playing with the horse"
        },
        "remember_chat_context": true
      }
    },
    {
      "name": "summary",
      "input": "Extract all the essential features from {{seed.output}} and generate a nice little summary for building the DALL-3 artwork. Output only the summary and do not output with your thoughts",
      "metadata": {
        "model": {
          "name": "gpt-3.5-turbo",
          "settings": {}
        },
        "parameters": {
          "content": "A little girl playing with the horse"
        },
        "remember_chat_context": true
      }
    },
    {
      "name": "summary_artgenerator",
      "input": "Generate a 600x600 {{summary.output}} make sure to do with water color painting",
      "metadata": {
        "model": {
          "name": "Dall-E 3",
          "settings": {}
        },
        "parameters": {
          "content": "A little girl playing with the horse"
        },
        "remember_chat_context": true
      }
    }
  ]
}
```

1. Login to [LastMileAI](https://lastmileai.dev/)
2. Navigate to the Workbooks and then do the following to upload the above aiconfig file.
3. Once the AiConfig is loaded, you can execute the cells and learn how to integrate with the AI models for generating the creative artwork, for example.

![AiConfigCreate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mjqxmep44hw9zop7tpt5.png) 

## Conclusion

Hope you enjoyed the "Summary" based AI artwork generation. Now you know how easy it's to build some creative and innovative artwork with a few sets of seed generators. That said, your creativity is the only limit!