in podcast/main.py [0:0]
def make_image(topic: str) -> ImageClip:
openai = make_openai()
image = openai.images.generate(
model="dall-e-3",
prompt=f"Cover for podcast called '{topic}' starring Elena and Marcus",
size="1792x1024",
quality="standard",
n=1,
)
response = requests.get(image.data[0].url)
with open(
file := tempfile.NamedTemporaryFile(suffix=".png", delete=False).name,
"wb",
) as f:
f.write(response.content)
return file