leoeric commited on
Commit
9e01ee0
·
1 Parent(s): 70a0086

Add queue system to handle long-running operations and prevent timeout errors

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -333,7 +333,8 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
333
  fn=generate_image,
334
  inputs=[image_prompt, image_aspect, image_cfg, image_seed, image_checkpoint, image_config],
335
  outputs=[image_output, image_status],
336
- show_progress=True
 
337
  )
338
 
339
  with gr.Tab("Text-to-Video"):
@@ -378,7 +379,8 @@ with gr.Blocks(title="STARFlow - Text-to-Image & Video Generation") as demo:
378
  inputs=[video_prompt, video_aspect, video_cfg, video_seed, video_length,
379
  video_checkpoint, video_config, video_input_image],
380
  outputs=[video_output, video_status],
381
- show_progress=True
 
382
  )
383
 
384
  if __name__ == "__main__":
 
333
  fn=generate_image,
334
  inputs=[image_prompt, image_aspect, image_cfg, image_seed, image_checkpoint, image_config],
335
  outputs=[image_output, image_status],
336
+ show_progress=True,
337
+ queue=True # Use queue to handle long-running operations
338
  )
339
 
340
  with gr.Tab("Text-to-Video"):
 
379
  inputs=[video_prompt, video_aspect, video_cfg, video_seed, video_length,
380
  video_checkpoint, video_config, video_input_image],
381
  outputs=[video_output, video_status],
382
+ show_progress=True,
383
+ queue=True # Use queue to handle long-running operations
384
  )
385
 
386
  if __name__ == "__main__":