lewtun HF staff commited on
Commit
10eada1
1 Parent(s): 68078de

Add translation

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -33,7 +33,7 @@ TASK_TO_ID = {
33
  # "multi_label_classification": 3, # Not fully supported in AutoTrain
34
  "entity_extraction": 4,
35
  "extractive_question_answering": 5,
36
- # "translation": 6, # Not fully supported in AutoTrain evaluation
37
  "summarization": 8,
38
  }
39
 
@@ -276,10 +276,12 @@ with st.form(key="form"):
276
  project_id = str(uuid.uuid4())[:3]
277
  payload = {
278
  "username": AUTOTRAIN_USERNAME,
279
- "proj_name": f"my-eval-project-{project_id}",
280
  "task": TASK_TO_ID[selected_task],
281
  "config": {
282
- "language": "en",
 
 
283
  "max_models": 5,
284
  "instance": {
285
  "provider": "aws",
 
33
  # "multi_label_classification": 3, # Not fully supported in AutoTrain
34
  "entity_extraction": 4,
35
  "extractive_question_answering": 5,
36
+ "translation": 6,
37
  "summarization": 8,
38
  }
39
 
 
276
  project_id = str(uuid.uuid4())[:3]
277
  payload = {
278
  "username": AUTOTRAIN_USERNAME,
279
+ "proj_name": f"eval-project-{project_id}",
280
  "task": TASK_TO_ID[selected_task],
281
  "config": {
282
+ "language": "en"
283
+ if selected_task != "translation"
284
+ else "en2de", # Need this dummy pair to enable translation
285
  "max_models": 5,
286
  "instance": {
287
  "provider": "aws",