lewtun HF staff commited on
Commit
f574f70
1 Parent(s): 195d0b9

Fix column mapping

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -14,6 +14,8 @@ AUTOTRAIN_USERNAME = os.getenv("AUTOTRAIN_USERNAME")
14
  AUTOTRAIN_BACKEND_API = os.getenv("AUTOTRAIN_BACKEND_API")
15
 
16
 
 
 
17
  with st.form(key="form"):
18
 
19
  dataset_name = st.selectbox("Select a dataset to evaluate on", ["lewtun/autoevaluate__emotion"])
@@ -43,9 +45,9 @@ with st.form(key="form"):
43
  for model in selected_models:
44
  payload = {
45
  "username": AUTOTRAIN_USERNAME,
46
- "task": 1,
47
  "model": model,
48
- "col_mapping": {"sentence": "text", "label": "target"},
49
  "split": selected_split,
50
  "dataset": original_dataset_name,
51
  "config": dataset_config,
 
14
  AUTOTRAIN_BACKEND_API = os.getenv("AUTOTRAIN_BACKEND_API")
15
 
16
 
17
+ TASK_TO_ID = {"binary_classification":1, "multi_class_classification": 2, "multi_label_classification": 3, "entity_extraction": 4, "extractive_question_answering":5, "translation":6, "summarization":8, "single_column_regression":10}
18
+
19
  with st.form(key="form"):
20
 
21
  dataset_name = st.selectbox("Select a dataset to evaluate on", ["lewtun/autoevaluate__emotion"])
 
45
  for model in selected_models:
46
  payload = {
47
  "username": AUTOTRAIN_USERNAME,
48
+ "task": TASK_TO_ID[metadata[0]["task_id"]],
49
  "model": model,
50
+ "col_mapping": metadata[0]["col_mapping"],
51
  "split": selected_split,
52
  "dataset": original_dataset_name,
53
  "config": dataset_config,