shumpei2525 commited on
Commit
e542ef8
·
verified ·
1 Parent(s): 0436c77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -7
app.py CHANGED
@@ -60,7 +60,7 @@ MAX_IMAGE_SIZE = 1024
60
 
61
  # Define the image generation function with progress
62
  @spaces.GPU # [uncomment to use ZeroGPU]
63
- def generate_image(place, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, progress=gr.Progress(track_tqdm=True)):
64
  with progress:
65
  progress(10, desc="シードの設定中...")
66
  if randomize_seed:
@@ -91,10 +91,6 @@ css = """
91
  margin: 0 auto;
92
  max-width: 640px;
93
  }
94
- .selected-button {
95
- background-color: #4CAF50 !important; /* 緑色に変更 */
96
- color: white !important;
97
- }
98
  """
99
 
100
  # Define the Gradio interface
@@ -199,8 +195,8 @@ with gr.Blocks(css=css) as demo:
199
  width,
200
  height,
201
  guidance_scale,
202
- num_inference_steps,
203
- gr.Progress(track_tqdm=True) # Pass the progress object
204
  ],
205
  outputs=[result, seed]
206
  )
 
60
 
61
  # Define the image generation function with progress
62
  @spaces.GPU # [uncomment to use ZeroGPU]
63
+ def generate_image(place, seed, randomize_seed, width, height, guidance_scale, num_inference_steps, progress: gr.Progress):
64
  with progress:
65
  progress(10, desc="シードの設定中...")
66
  if randomize_seed:
 
91
  margin: 0 auto;
92
  max-width: 640px;
93
  }
 
 
 
 
94
  """
95
 
96
  # Define the Gradio interface
 
195
  width,
196
  height,
197
  guidance_scale,
198
+ num_inference_steps
199
+ # progress parameter is handled automatically by Gradio
200
  ],
201
  outputs=[result, seed]
202
  )