mrprycep069's picture
adding ChatGPT to repo
653d710
# -*- coding: utf-8 -*-
"""TextToString.ipynb
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1kqcUjAv-A2eaBXwzEAhDP--7MXYS2zZ3
"""
import openai
openai.api_key = "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"
def imagegenerator(title, amount, size):
response = openai.Image.create(
prompt=title,
n=amount,
size=size
)
image_url = response['data'][0]['url']
return image_url
def menu():
title = str(input("Input what kind of pictur that you want to generate"))
amount = int(input("Input the amount picture that you want to generate"))
size = str(input("Input the size pof the image you want to generate"))
return imagegenerator(title, amount, size)
menu()