-
-
Notifications
You must be signed in to change notification settings - Fork 468
/
Copy pathproject.yml
28 lines (25 loc) · 1.51 KB
/
project.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
title: "Streamlit integration"
description: "[Streamlit](https://streamlit.io) is a Python framework for building interactive data apps. The [`spacy-streamlit`](https://github.com/explosion/spacy-streamlit) package helps you integrate spaCy visualizations into your Streamlit apps and quickly spin up demos to explore your pipelines interactively. It includes a full embedded visualizer, as well as individual components. If you're training your own pipelines, you can integrate the `visualize` command into your `project.yml` and pass in the path to your exported pipeline to visualize it. See the tutorial project templates for examples."
# Variables can be referenced across the project.yml using ${vars.var_name}
vars:
# The default text shown in the visualizer on load
default_text: "Sundar Pichai is the CEO of Google."
# A comma-separated list of paths or installed package names
models: "en_core_web_sm,en_core_web_lg,en_core_web_trf"
# These are the directories that the project needs. The project CLI will make
# sure that they always exist.
directories: ["scripts"]
commands:
- name: "download"
help: "Download models"
script:
- "python -m spacy download en_core_web_sm"
- "python -m spacy download en_core_web_lg"
- "python -m spacy download en_core_web_trf"
- name: visualize
help: Visualize a pipeline interactively using Streamlit
script:
- "streamlit run scripts/visualize.py ${vars.models} \"${vars.default_text}\""
deps:
- "scripts/visualize.py"
no_skip: true