Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
| 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)
|