Spaces:
Runtime error
Runtime error
add conditional on size
Browse files37 unmodified lines3839404142434437 unmodified linesprompt=text,model=model, # dall-e-2 or dall-e-3quality="standard", # standard or hdsize="1024x1024", # varies for dalle-2 and dalle-3, see https://openai.com/pricing for resolutionsn=1, # Number of images to generate)except Exception as error:37 unmodified lines3839404142434437 unmodified linesprompt=text,model=model, # dall-e-2 or dall-e-3quality="standard", # standard or hdsize="512x512" if model == "dall-e-2" else "1024x1024", # varies for dalle-2 and dalle-3, see https://openai.com/pricing for resolutionsn=1, # Number of images to generate)except Exception as error:
app.py+1-1