chaojiemao commited on
Commit
86382fa
·
verified ·
1 Parent(s): dc9c589

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -367,8 +367,8 @@ with gr.Blocks() as demo:
367
  task_status[task_id]["url"] = video_url
368
  waiting_time = get_waiting_time(task_id)
369
  value = task_status.get(task_id, {"value": 100})["value"]
370
- value = min(value, int(cost_time*100/waiting_time))
371
- task_status[task_id]["value"] = value
372
  if not video_url == "" and status: value = 100
373
  process_bar = gr.Slider(label=f"({value}%)Generating" if value % 2 == 1 else f"({value}%)Generating.....", value=value)
374
  process_change_ret = process_change(task_id, task)
@@ -391,5 +391,5 @@ with gr.Blocks() as demo:
391
  cost_time, waiting_time, process_bar]
392
  )
393
 
394
- demo.queue(max_size=10)
395
- demo.launch(ssr_mode=True)
 
367
  task_status[task_id]["url"] = video_url
368
  waiting_time = get_waiting_time(task_id)
369
  value = task_status.get(task_id, {"value": 100})["value"]
370
+ value = max(value, int(cost_time*100/waiting_time))
371
+ task_status[task_id]["value"] = value if value < 100 else 100
372
  if not video_url == "" and status: value = 100
373
  process_bar = gr.Slider(label=f"({value}%)Generating" if value % 2 == 1 else f"({value}%)Generating.....", value=value)
374
  process_change_ret = process_change(task_id, task)
 
391
  cost_time, waiting_time, process_bar]
392
  )
393
 
394
+ #demo.queue(max_size=10)
395
+ demo.launch(ssr_mode=False)