anthienlong commited on
Commit
a89d3c4
·
verified ·
1 Parent(s): 561b6f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -8
app.py CHANGED
@@ -28,8 +28,8 @@ def initialize_model():
28
  def generate_image(
29
  prompt,
30
  guidance_scale=3.5,
31
- width=1024,
32
- height=1024
33
  ):
34
  try:
35
  # Initialize model within the GPU context
@@ -60,7 +60,7 @@ demo = gr.Interface(
60
  gr.Textbox(
61
  label="Prompt",
62
  placeholder="Enter your image description here...",
63
- value="a glass cup with beer, inside the beer a scuba diver, with a beautiful sunset background"
64
  ),
65
  gr.Slider(
66
  minimum=1,
@@ -71,20 +71,20 @@ demo = gr.Interface(
71
  ),
72
  gr.Slider(
73
  minimum=128,
74
- maximum=1024,
75
- value=1024,
76
  label="Width",
77
  step=64
78
  ),
79
  gr.Slider(
80
  minimum=128,
81
- maximum=1024,
82
- value=1024,
83
  label="Height",
84
  step=64
85
  )
86
  ],
87
- outputs=gr.Image(type="pil", label="Generated Image"),
88
  title="Freepix Flux.1-lite-8B-alpha Model (Zero-GPU)",
89
  description="Generate images using Freepik's Flux model with Zero-GPU allocation. Using 25 fixed steps and random seed for each generation.",
90
  examples=[
 
28
  def generate_image(
29
  prompt,
30
  guidance_scale=3.5,
31
+ width=1152,
32
+ height=1152
33
  ):
34
  try:
35
  # Initialize model within the GPU context
 
60
  gr.Textbox(
61
  label="Prompt",
62
  placeholder="Enter your image description here...",
63
+ value=" "
64
  ),
65
  gr.Slider(
66
  minimum=1,
 
71
  ),
72
  gr.Slider(
73
  minimum=128,
74
+ maximum=1152,
75
+ value=1152,
76
  label="Width",
77
  step=64
78
  ),
79
  gr.Slider(
80
  minimum=128,
81
+ maximum=1152,
82
+ value=1152,
83
  label="Height",
84
  step=64
85
  )
86
  ],
87
+ outputs=gr.Image(type="pil", label="Ảnh đã tạo"),
88
  title="Freepix Flux.1-lite-8B-alpha Model (Zero-GPU)",
89
  description="Generate images using Freepik's Flux model with Zero-GPU allocation. Using 25 fixed steps and random seed for each generation.",
90
  examples=[