laverdes commited on
Commit
3e5ede3
·
verified ·
1 Parent(s): b68bcbe

fixdev: add default_model_checkpoint for translation

Browse files
Files changed (1) hide show
  1. app.py +3 -1
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
- translation_tool = load_tool("smolagents-tools/translation", model_repo_id="facebook/nllb-200-distilled-600M", trust_remote_code=True)
 
 
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)