chaojiemao commited on
Commit
49bc9df
·
verified ·
1 Parent(s): 217464b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -8
app.py CHANGED
@@ -17,7 +17,7 @@ KEEP_RUNING_TASK = 3600 * 1
17
  # the total running task number in 1800 seconds
18
  LIMIT_RUNING_TASK = 2
19
  LIMIT_HISTORY_RUNING_TASK = 4
20
- FRESH_TIME = 3600
21
 
22
  task_status = {}
23
 
@@ -287,12 +287,16 @@ with gr.Blocks() as demo:
287
  with gr.Row():
288
  watermark_wan = gr.Checkbox(label="Watermark", value=True, visible=True, container=False)
289
  seed = gr.Number(label="Seed", value=-1, container=True)
290
- cost_time = gr.Number(label="Cost Time(secs)", value=online_get_cost_time, interactive=False,
291
- every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id], container=True)
292
- waiting_time = gr.Number(label="Estimated Waiting Time(secs)", value=online_get_waiting_time, interactive=False,
293
- every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id], container=True)
294
- process_bar = gr.Slider(show_label=True, label="", value=get_process_bar, maximum=100,
295
- interactive=True, every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id, status], container=True)
 
 
 
 
296
  with gr.Row():
297
  gr.Markdown('<span style="color: blue;">Due to automatic refresh of task status causing significant network congestion, please manually click the "Refresh Generating Status" button to check the task status.</span>')
298
  fake_video = gr.Video(label='Examples', visible=False, interactive=False)
@@ -384,4 +388,4 @@ with gr.Blocks() as demo:
384
  )
385
 
386
  demo.queue(max_size=10)
387
- demo.launch()
 
17
  # the total running task number in 1800 seconds
18
  LIMIT_RUNING_TASK = 2
19
  LIMIT_HISTORY_RUNING_TASK = 4
20
+ FRESH_TIME = None
21
 
22
  task_status = {}
23
 
 
287
  with gr.Row():
288
  watermark_wan = gr.Checkbox(label="Watermark", value=True, visible=True, container=False)
289
  seed = gr.Number(label="Seed", value=-1, container=True)
290
+ # cost_time = gr.Number(label="Cost Time(secs)", value=online_get_cost_time, interactive=False,
291
+ # every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id], container=True)
292
+ cost_time = gr.Number(label="Cost Time(secs)", value=0, interactive=False, container=True)
293
+ # waiting_time = gr.Number(label="Estimated Waiting Time(secs)", value=online_get_waiting_time, interactive=False,
294
+ # every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id], container=True)
295
+ waiting_time = gr.Number(label="Estimated Waiting Time(secs)", value=0, interactive=False, container=True)
296
+ # process_bar = gr.Slider(show_label=True, label="", value=get_process_bar, maximum=100,
297
+ # interactive=True, every=FRESH_TIME, inputs=[task, t2v_task_id, i2v_task_id, status], container=True)
298
+ process_bar = gr.Slider(show_label=True, label="", value=100, maximum=100,
299
+ interactive=True, container=True)
300
  with gr.Row():
301
  gr.Markdown('<span style="color: blue;">Due to automatic refresh of task status causing significant network congestion, please manually click the "Refresh Generating Status" button to check the task status.</span>')
302
  fake_video = gr.Video(label='Examples', visible=False, interactive=False)
 
388
  )
389
 
390
  demo.queue(max_size=10)
391
+ demo.launch(ssr_mode=False)