lewtun HF staff commited on
Commit
1412968
2 Parent(s): b6925b7 1e7e407

Merge pull request #44 from huggingface/add-question-answering

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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, # Disabled until we have SQuAD metrics support
41
  "translation": 6,
42
  "summarization": 8,
43
  }
@@ -51,7 +51,7 @@ TASK_TO_DEFAULT_METRICS = {
51
  "accuracy",
52
  ],
53
  "entity_extraction": ["precision", "recall", "f1", "accuracy"],
54
- "extractive_question_answering": [],
55
  "translation": ["sacrebleu"],
56
  "summarization": ["rouge1", "rouge2", "rougeL", "rougeLsum"],
57
  "image_binary_classification": ["f1", "precision", "recall", "auc", "accuracy"],
@@ -71,7 +71,7 @@ AUTOTRAIN_TASK_TO_LANG = {
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
 
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
  }
 
51
  "accuracy",
52
  ],
53
  "entity_extraction": ["precision", "recall", "f1", "accuracy"],
54
+ "extractive_question_answering": ["f1", "exact_match"],
55
  "translation": ["sacrebleu"],
56
  "summarization": ["rouge1", "rouge2", "rougeL", "rougeLsum"],
57
  "image_binary_classification": ["f1", "precision", "recall", "auc", "accuracy"],
 
71
 
72
 
73
  SUPPORTED_TASKS = list(TASK_TO_ID.keys())
74
+ UNSUPPORTED_TASKS = []
75
 
76
  # Extracted from utils.get_supported_metrics
77
  # Hardcoded for now due to speed / caching constraints