Advertisement
Cabaca

Untitled

May 14th, 2024
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. prompt = input(“Image prompt: “)
  2.  
  3. res = client.images.generate(
  4.  
  5. model=”dall-e-2,
  6.  
  7. prompt=prompt,
  8.  
  9. n=2,
  10.  
  11. size=256×256
  12.  
  13. )
  14.  
  15. print(“Assistant: ” + res.data[0].url)
  16.  
  17. for image variations:
  18.  
  19. image_variation_data = client.images.create_variation(
  20.  
  21. image=open(“./images/img_sample.png, “rb”),
  22.  
  23. n=1,
  24.  
  25. size=256×256
  26.  
  27. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement