Sean Laurent
commited on
Commit
Β·
9dd7653
1
Parent(s):
0c75170
app.py updates π
Browse files
app.py
CHANGED
|
@@ -9,10 +9,9 @@ openai.api_key = os.environ.get("OPENAI_API_KEY")
|
|
| 9 |
def open_ai_txt2img(prompt):
|
| 10 |
response = openai.Image.create(
|
| 11 |
prompt=prompt,
|
|
|
|
| 12 |
size="1024x1024",
|
| 13 |
-
response_format="url"
|
| 14 |
)
|
| 15 |
-
print("Response:", response)
|
| 16 |
return response["data"][0]["url"]
|
| 17 |
|
| 18 |
# Gradio Interface
|
|
|
|
| 9 |
def open_ai_txt2img(prompt):
|
| 10 |
response = openai.Image.create(
|
| 11 |
prompt=prompt,
|
| 12 |
+
n=1,
|
| 13 |
size="1024x1024",
|
|
|
|
| 14 |
)
|
|
|
|
| 15 |
return response["data"][0]["url"]
|
| 16 |
|
| 17 |
# Gradio Interface
|