Spaces:
Runtime error
Runtime error
Disable support for question answering
Browse files
README.md
CHANGED
|
@@ -22,7 +22,7 @@ The table below shows which tasks are currently supported for evaluation in the
|
|
| 22 |
| `multi_class_classification` | β
|
|
| 23 |
| `multi_label_classification` | β |
|
| 24 |
| `entity_extraction` | β
|
|
| 25 |
-
| `extractive_question_answering` |
|
| 26 |
| `translation` | β
|
|
| 27 |
| `summarization` | β
|
|
| 28 |
| `image_binary_classification` | β
|
|
|
|
|
| 22 |
| `multi_class_classification` | β
|
|
| 23 |
| `multi_label_classification` | β |
|
| 24 |
| `entity_extraction` | β
|
|
| 25 |
+
| `extractive_question_answering` | β |
|
| 26 |
| `translation` | β
|
|
| 27 |
| `summarization` | β
|
|
| 28 |
| `image_binary_classification` | β
|
|
app.py
CHANGED
|
@@ -37,7 +37,7 @@ TASK_TO_ID = {
|
|
| 37 |
"binary_classification": 1,
|
| 38 |
"multi_class_classification": 2,
|
| 39 |
"entity_extraction": 4,
|
| 40 |
-
"extractive_question_answering": 5,
|
| 41 |
"translation": 6,
|
| 42 |
"summarization": 8,
|
| 43 |
}
|
|
@@ -71,6 +71,7 @@ AUTOTRAIN_TASK_TO_LANG = {
|
|
| 71 |
|
| 72 |
|
| 73 |
SUPPORTED_TASKS = list(TASK_TO_ID.keys())
|
|
|
|
| 74 |
|
| 75 |
# Extracted from utils.get_supported_metrics
|
| 76 |
# Hardcoded for now due to speed / caching constraints
|
|
@@ -173,6 +174,10 @@ if metadata is None:
|
|
| 173 |
|
| 174 |
with st.expander("Advanced configuration"):
|
| 175 |
# Select task
|
|
|
|
|
|
|
|
|
|
|
|
|
| 176 |
selected_task = st.selectbox(
|
| 177 |
"Select a task",
|
| 178 |
SUPPORTED_TASKS,
|
|
|
|
| 37 |
"binary_classification": 1,
|
| 38 |
"multi_class_classification": 2,
|
| 39 |
"entity_extraction": 4,
|
| 40 |
+
# "extractive_question_answering": 5, # Disabled until we have SQuAD metrics support
|
| 41 |
"translation": 6,
|
| 42 |
"summarization": 8,
|
| 43 |
}
|
|
|
|
| 71 |
|
| 72 |
|
| 73 |
SUPPORTED_TASKS = list(TASK_TO_ID.keys())
|
| 74 |
+
UNSUPPORTED_TASKS = ["extractive_question_answering"]
|
| 75 |
|
| 76 |
# Extracted from utils.get_supported_metrics
|
| 77 |
# Hardcoded for now due to speed / caching constraints
|
|
|
|
| 174 |
|
| 175 |
with st.expander("Advanced configuration"):
|
| 176 |
# Select task
|
| 177 |
+
# Hack to filter for unsupported tasks
|
| 178 |
+
# TODO(lewtun): remove this once we have SQuAD metrics support
|
| 179 |
+
if metadata[0]["task_id"] in UNSUPPORTED_TASKS:
|
| 180 |
+
metadata = None
|
| 181 |
selected_task = st.selectbox(
|
| 182 |
"Select a task",
|
| 183 |
SUPPORTED_TASKS,
|