Tobias Geisler commited on
Commit
7552856
·
1 Parent(s): ecc5c7b

add queuing and password

Browse files
Files changed (1) hide show
  1. app.py +6 -8
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", # Choose from "1024x1024", "1024x1792", or "1792x1024"
33
- quality="standard", # Choose "standard" or "hd" for higher quality
34
- n=1 # Number of images to generate
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
- # Enable queuing with a concurrency limit of 2
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()