Kvikontent commited on
Commit
0444499
·
1 Parent(s): 0c55ff9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -10,6 +10,7 @@ def load_image(url):
10
  return image
11
 
12
  def generate_image(prompt):
 
13
  faces = [
14
  "https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
15
  "https://avatars.mds.yandex.net/i?id=e02f3f0a7cab6ae7eba3b1209ba9d56dcc24715a-7552414-images-thumbs&n=13",
@@ -228,8 +229,8 @@ def generate_image(prompt):
228
 
229
  iface = gr.Interface(
230
  fn=generate_image,
231
- inputs=gr.inputs.Textbox(label="Enter prompt"),
232
- outputs=gr.outputs.Image(label="Generated Image", type="pil"), # Change type to "pil"
233
  title="KVIImager 2.0 - Image Generator",
234
  description="Generate images based on a prompt.",
235
  examples=[
 
10
  return image
11
 
12
  def generate_image(prompt):
13
+ time.sleep(random.randint(10, 20))
14
  faces = [
15
  "https://avatars.mds.yandex.net/i?id=f9676dc9c99572353c509d298a0b9f6571edca4e-10514707-images-thumbs&n=13",
16
  "https://avatars.mds.yandex.net/i?id=e02f3f0a7cab6ae7eba3b1209ba9d56dcc24715a-7552414-images-thumbs&n=13",
 
229
 
230
  iface = gr.Interface(
231
  fn=generate_image,
232
+ inputs=gr.inputs.Textbox(label="Enter prompt", lines=3), # Используем компонент Textbox, чтобы отображать textarea
233
+ outputs=gr.outputs.Image(label="Generated Image", type="pil"),
234
  title="KVIImager 2.0 - Image Generator",
235
  description="Generate images based on a prompt.",
236
  examples=[