Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def get_attention_models() -> List[str]:
|
|
37 |
"""Get a list of timm models that have attention blocks."""
|
38 |
all_models = timm.list_pretrained()
|
39 |
# FIXME Focusing on ViT models for initial impl
|
40 |
-
attention_models = [model for model in all_models if any([model.lower().startswith(p) for p in ('vit', 'deit', 'beit', 'eva')]
|
41 |
return attention_models
|
42 |
|
43 |
def load_model(model_name: str) -> Tuple[torch.nn.Module, AttentionExtractor]:
|
|
|
37 |
"""Get a list of timm models that have attention blocks."""
|
38 |
all_models = timm.list_pretrained()
|
39 |
# FIXME Focusing on ViT models for initial impl
|
40 |
+
attention_models = [model for model in all_models if any([model.lower().startswith(p) for p in ('vit', 'deit', 'beit', 'eva'))]
|
41 |
return attention_models
|
42 |
|
43 |
def load_model(model_name: str) -> Tuple[torch.nn.Module, AttentionExtractor]:
|