Spaces:
Running
Running
Tobias Geisler
commited on
Commit
·
7552856
1
Parent(s):
ecc5c7b
add queuing and password
Browse files
app.py
CHANGED
|
@@ -29,9 +29,9 @@ def generate_image(hair_color, eye_color, person, age, style, password):
|
|
| 29 |
response = client.images.generate(
|
| 30 |
model="dall-e-3",
|
| 31 |
prompt=prompt,
|
| 32 |
-
size="1024x1024",
|
| 33 |
-
quality="standard",
|
| 34 |
-
n=1
|
| 35 |
)
|
| 36 |
|
| 37 |
# Get the image URL from the response
|
|
@@ -60,11 +60,9 @@ iface = gr.Interface(
|
|
| 60 |
],
|
| 61 |
outputs=[gr.Text(label="Prompt"), gr.Image(label="Generated Image")],
|
| 62 |
title="Profile Picture Generator",
|
| 63 |
-
description="Enter the attributes for your profile picture."
|
|
|
|
| 64 |
)
|
| 65 |
|
| 66 |
-
#
|
| 67 |
-
iface.queue(concurrency_count=2)
|
| 68 |
-
|
| 69 |
-
# Run the Gradio app
|
| 70 |
iface.launch()
|
|
|
|
| 29 |
response = client.images.generate(
|
| 30 |
model="dall-e-3",
|
| 31 |
prompt=prompt,
|
| 32 |
+
size="1024x1024",
|
| 33 |
+
quality="standard",
|
| 34 |
+
n=1
|
| 35 |
)
|
| 36 |
|
| 37 |
# Get the image URL from the response
|
|
|
|
| 60 |
],
|
| 61 |
outputs=[gr.Text(label="Prompt"), gr.Image(label="Generated Image")],
|
| 62 |
title="Profile Picture Generator",
|
| 63 |
+
description="Enter the attributes for your profile picture.",
|
| 64 |
+
concurrency_limit=2 # Set concurrency limit here
|
| 65 |
)
|
| 66 |
|
| 67 |
+
# Launch the Gradio app
|
|
|
|
|
|
|
|
|
|
| 68 |
iface.launch()
|