Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,12 +39,11 @@ models = [
|
|
| 39 |
|
| 40 |
def setup_model(config_file, model_path=None):
|
| 41 |
cfg = get_cfg()
|
|
|
|
| 42 |
|
| 43 |
if model_path:
|
| 44 |
-
cfg.merge_from_file(config_file)
|
| 45 |
cfg.MODEL.WEIGHTS = model_path
|
| 46 |
else:
|
| 47 |
-
cfg.merge_from_file(model_zoo.get_config_file(config_file))
|
| 48 |
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(config_file)
|
| 49 |
|
| 50 |
if not torch.cuda.is_available():
|
|
|
|
| 39 |
|
| 40 |
def setup_model(config_file, model_path=None):
|
| 41 |
cfg = get_cfg()
|
| 42 |
+
cfg.merge_from_file(model_zoo.get_config_file(config_file))
|
| 43 |
|
| 44 |
if model_path:
|
|
|
|
| 45 |
cfg.MODEL.WEIGHTS = model_path
|
| 46 |
else:
|
|
|
|
| 47 |
cfg.MODEL.WEIGHTS = model_zoo.get_checkpoint_url(config_file)
|
| 48 |
|
| 49 |
if not torch.cuda.is_available():
|