Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def generate_image(prompt):
|
|
15 |
n=1,
|
16 |
size="1024x1024"
|
17 |
)
|
18 |
-
image_url = response
|
19 |
image = Image.open(BytesIO(requests.get(image_url).content))
|
20 |
return image
|
21 |
|
@@ -33,7 +33,10 @@ iface = gr.Interface(
|
|
33 |
],
|
34 |
title="TalkGPT Image Generation",
|
35 |
description="Use AI to generate images based on a prompt.",
|
36 |
-
allow_flagging=
|
37 |
analytics_enabled=True,
|
38 |
theme="compact"
|
39 |
)
|
|
|
|
|
|
|
|
15 |
n=1,
|
16 |
size="1024x1024"
|
17 |
)
|
18 |
+
image_url = response.data[0].url
|
19 |
image = Image.open(BytesIO(requests.get(image_url).content))
|
20 |
return image
|
21 |
|
|
|
33 |
],
|
34 |
title="TalkGPT Image Generation",
|
35 |
description="Use AI to generate images based on a prompt.",
|
36 |
+
allow_flagging="never",
|
37 |
analytics_enabled=True,
|
38 |
theme="compact"
|
39 |
)
|
40 |
+
|
41 |
+
iface.launch()
|
42 |
+
|