Ignore `with-past` for now.
Browse files
app.py
CHANGED
|
@@ -167,14 +167,17 @@ def on_model_change(model):
|
|
| 167 |
config = json.loads(config_json)
|
| 168 |
model_type = config["model_type"]
|
| 169 |
|
|
|
|
| 170 |
features = FeaturesManager.get_supported_features_for_model_type(model_type)
|
| 171 |
tasks = list(features.keys())
|
|
|
|
| 172 |
|
| 173 |
model_info = retrieve_model_info(model)
|
| 174 |
frameworks = model_info["frameworks"]
|
| 175 |
selected_framework = frameworks[0] if len(frameworks) > 0 else None
|
| 176 |
|
| 177 |
pipeline_tag = model_info["pipeline_tag"]
|
|
|
|
| 178 |
# Select the task corresponding to the pipeline tag
|
| 179 |
if tasks:
|
| 180 |
if pipeline_tag in tags_to_tasks_mapping:
|
|
|
|
| 167 |
config = json.loads(config_json)
|
| 168 |
model_type = config["model_type"]
|
| 169 |
|
| 170 |
+
# Ignore `-with-past` for now
|
| 171 |
features = FeaturesManager.get_supported_features_for_model_type(model_type)
|
| 172 |
tasks = list(features.keys())
|
| 173 |
+
tasks = [task for task in tasks if "-with-past" not in task]
|
| 174 |
|
| 175 |
model_info = retrieve_model_info(model)
|
| 176 |
frameworks = model_info["frameworks"]
|
| 177 |
selected_framework = frameworks[0] if len(frameworks) > 0 else None
|
| 178 |
|
| 179 |
pipeline_tag = model_info["pipeline_tag"]
|
| 180 |
+
# print(pipeline_tag)
|
| 181 |
# Select the task corresponding to the pipeline tag
|
| 182 |
if tasks:
|
| 183 |
if pipeline_tag in tags_to_tasks_mapping:
|