chaojiemao commited on
Commit
ed5e4cb
·
verified ·
1 Parent(s): e609525

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -76,7 +76,8 @@ class DemoUI(object):
76
  pipe_cfg = self.model_choices[self.default_model_name]
77
  infer_name = pipe_cfg.get("INFERENCE_TYPE", "ACE")
78
  self.pipe = inference_dict[infer_name]()
79
- self.pipe.init_from_cfg(pipe_cfg)
 
80
 
81
  # choose different model
82
  self.task_model_cfg = Config(load=True, cfg_file=model_list)
 
76
  pipe_cfg = self.model_choices[self.default_model_name]
77
  infer_name = pipe_cfg.get("INFERENCE_TYPE", "ACE")
78
  self.pipe = inference_dict[infer_name]()
79
+ with spaces.GPU(duration=60):
80
+ self.pipe.init_from_cfg(pipe_cfg)
81
 
82
  # choose different model
83
  self.task_model_cfg = Config(load=True, cfg_file=model_list)