Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,6 +58,7 @@ video_sty = '\U0001f3a5' # 🎥
|
|
| 58 |
|
| 59 |
lock = threading.Lock()
|
| 60 |
class DemoUI(object):
|
|
|
|
| 61 |
def __init__(self,
|
| 62 |
infer_dir = "./config",
|
| 63 |
model_list='./models/model_zoo.yaml'
|
|
@@ -78,8 +79,7 @@ class DemoUI(object):
|
|
| 78 |
pipe_cfg = self.model_choices[self.default_model_name]
|
| 79 |
infer_name = pipe_cfg.get("INFERENCE_TYPE", "ACE")
|
| 80 |
self.pipe = inference_dict[infer_name]()
|
| 81 |
-
|
| 82 |
-
self.pipe.init_from_cfg(pipe_cfg)
|
| 83 |
|
| 84 |
# choose different model
|
| 85 |
self.task_model_cfg = Config(load=True, cfg_file=model_list)
|
|
|
|
| 58 |
|
| 59 |
lock = threading.Lock()
|
| 60 |
class DemoUI(object):
|
| 61 |
+
@spaces.GPU(duration=60)
|
| 62 |
def __init__(self,
|
| 63 |
infer_dir = "./config",
|
| 64 |
model_list='./models/model_zoo.yaml'
|
|
|
|
| 79 |
pipe_cfg = self.model_choices[self.default_model_name]
|
| 80 |
infer_name = pipe_cfg.get("INFERENCE_TYPE", "ACE")
|
| 81 |
self.pipe = inference_dict[infer_name]()
|
| 82 |
+
self.pipe.init_from_cfg(pipe_cfg)
|
|
|
|
| 83 |
|
| 84 |
# choose different model
|
| 85 |
self.task_model_cfg = Config(load=True, cfg_file=model_list)
|