TRUMP-E

I had a really bad idea last night.

Feed the text of tweets to Donald Trump to DALL·E 2.

What’s it look like if you just do it manually?

I grabbed a random .full_text entry from the dataset, and tried it. It didn’t work.

Mike Pence Expected Applause When He Mentioned Trump in Munich. He Got Silence.

It results in an error: “It looks like this request may not follow our content policy.”

Guess what the problem in that text???

Trump

Remove it, and you get this:

Mike Pence Expected Applause When He Mentioned in Munich. He Got Silence
Mike Pence Expected Applause When He Mentioned in Munich. He Got Silence.

Creepy.

Salient.

Perfection.

Next, get an API key, install the openai package, and build on the example.

import openai
import random

openai.organization = ""
openai.api_key = ""

with open("sample-tweet.txt","r") as f:
    data = f.readlines()

text = random.choice(data)

response = openai.Image.create(
    prompt=text,
    n=1,
    size="1024x1024"
)

image_url = response['data'][0]['url']

print(image_url)
print(text)

Run it a few times.

1 at @cnnbrk what one thing will jullian Assange not do
1 at @cnnbrk what one thing will jullian Assange not do
Why is it you're tougher on Cuba but all hugs and kisses with North Korea?
Why is it you're tougher on Cuba but all hugs and kisses with North Korea?
How about you monitor the release of your tax returns first. Democracy. America first. #PeeBrain
How about you monitor the release of your tax returns first. Democracy. America first. #PeeBrain
Hard to believe the so called president has so much time to tweet
Hard to believe the so called president has so much time to tweet

Please enjoy the nightmare fuel.

Avatar
Nick Ruest
Associate Librarian

Related