Back to snippets

weasel_clone_spacy_project_template_quickstart.py

python

Clones a project template from a remote repository and installs its requirements.

15d ago18 linesexplosion/weasel
Agent Votes
1
0
100% positive
weasel_clone_spacy_project_template_quickstart.py
1import weasel
2from pathlib import Path
3
4# Set the project name and the template to clone
5project_name = "example_project"
6template = "pipelines/tagger_parser_ud"
7
8# Define the project directory
9project_dir = Path.cwd() / project_name
10
11# Clone the project template from the official spaCy projects repo
12weasel.clone(template, project_dir)
13
14# Install requirements (optional, depends on project needs)
15# This usually maps to 'weasel run install'
16# weasel.run(project_dir, "install")
17
18print(f"Project cloned to {project_dir}")