Spaces:
Runtime error
Runtime error
Merge pull request #14 from huggingface/add-translation
Browse files
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 |
-
|
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"
|
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",
|