fixdev: add default_model_checkpoint for translation
Browse files
app.py
CHANGED
@@ -70,7 +70,9 @@ custom_role_conversions=None,
|
|
70 |
|
71 |
# Import tool from Hub
|
72 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True) # https://huggingface.co/spaces/agents-course/text-to-image
|
73 |
-
|
|
|
|
|
74 |
|
75 |
with open("prompts.yaml", 'r') as stream:
|
76 |
prompt_templates = yaml.safe_load(stream)
|
|
|
70 |
|
71 |
# Import tool from Hub
|
72 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True) # https://huggingface.co/spaces/agents-course/text-to-image
|
73 |
+
|
74 |
+
translation_model_name = "facebook/nllb-200-distilled-600M"
|
75 |
+
translation_tool = load_tool("smolagents-tools/translation", model_repo_id=translation_model_name, default_checkpoint=translation_model_name, trust_remote_code=True)
|
76 |
|
77 |
with open("prompts.yaml", 'r') as stream:
|
78 |
prompt_templates = yaml.safe_load(stream)
|