Joocjun hogepodge commited on
Commit
57561b1
β€’
0 Parent(s):

Duplicate from LabelStudio/LabelStudio

Browse files

Co-authored-by: Chris Hoge <hogepodge@users.noreply.huggingface.co>

Files changed (3) hide show
  1. .gitattributes +34 -0
  2. Dockerfile +99 -0
  3. README.md +148 -0
.gitattributes ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tflite filter=lfs diff=lfs merge=lfs -text
29
+ *.tgz filter=lfs diff=lfs merge=lfs -text
30
+ *.wasm filter=lfs diff=lfs merge=lfs -text
31
+ *.xz filter=lfs diff=lfs merge=lfs -text
32
+ *.zip filter=lfs diff=lfs merge=lfs -text
33
+ *.zst filter=lfs diff=lfs merge=lfs -text
34
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
Dockerfile ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM heartexlabs/label-studio:hf-latest
2
+
3
+ ################################################################################
4
+ #
5
+ # How to Disable Public Account Creation
6
+ # --------------------------------------
7
+ # By default this space allows for the unrestricted creation of new accounts
8
+ # will full access to all projects and data. This is great for trying out
9
+ # Label Studio and collaborating on projects, but you may want to restrict
10
+ # access to your space to only authorized users. Uncomment the following line
11
+ # to disable public account creation for this space.
12
+ #
13
+ # ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true
14
+ #
15
+ # Set secrets in your space to create an inital user, and log in with your
16
+ # provided username and password. Do not set these in your Dockerfile, as they
17
+ # globally visible on a public space.
18
+ #
19
+ # LABEL_STUDIO_USERNAME
20
+ # LABEL_STUDIO_PASSWORD
21
+ #
22
+ # You will need to provide new users with an invitation link to join the space.
23
+ #
24
+ ################################################################################
25
+
26
+ ################################################################################
27
+ #
28
+ # How to Enable Configuration Persistence
29
+ # ---------------------------------------
30
+ # By default this space stores all project configuration and data annotations
31
+ # in local storage with Sqlite. If the space is reset, all configuration and
32
+ # annotation data in the space will be lost. You can enable configuration
33
+ # persistence by connecting an external Postgres database to your space,
34
+ # guaranteeing that all project and annotation settings are preserved.
35
+ #
36
+ # Set the following secret variables to match your own hosted instance of
37
+ # Postgres. We strongly recommend setting these as secrets to prevent leaking
38
+ # information about your database service to the public in your spaces
39
+ # definition.
40
+ #
41
+ # ENV DJANGO_DB=default
42
+ # ENV POSTGRE_NAME=<postgres_name>
43
+ # ENV POSTGRE_PORT=<db_port>
44
+ # ENV POSTGRE_USER=<postgres_user>
45
+ # ENV POSTGRE_PASSWORD=<password>
46
+ # ENV POSTGRE_PORT=<db_port>
47
+ # ENV POSTGRE_HOST=<db_host>
48
+ #
49
+ # Uncomment the following line to remove the warning about ephemeral storage
50
+ #
51
+ # ENV STORAGE_PERSISTENCE=1
52
+ #
53
+ # Note that you will need to connect cloud storage to host data items that you
54
+ # want to annotate, as local storage will not be preserved across a space reset.
55
+ #
56
+ ################################################################################
57
+
58
+ ################################################################################
59
+ #
60
+ # How to Enable Cloud Storage
61
+ # ---------------------------
62
+ # By default the only data storage enabled for this space is local. In the case
63
+ # of a space reset, all data will be lost. To enable permanent storage, you
64
+ # must enable a cloud storage connector. We also strongly recommend enabling
65
+ # configuration persistence to preserve project data, annotations, and user
66
+ # settings. Choose the appropriate cloud connector and configure the secrets
67
+ # for it.
68
+ #
69
+ # Amazon S3
70
+ # =========
71
+ # STORAGE_TYPE=s3
72
+ # STORAGE_AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"
73
+ # STORAGE_AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"
74
+ # STORAGE_AWS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
75
+ # STORAGE_AWS_REGION_NAME="<YOUR_BUCKET_REGION>"
76
+ # STORAGE_AWS_FOLDER=""
77
+ #
78
+ # Google Cloud Storage
79
+ # ====================
80
+ #
81
+ # STORAGE_TYPE=gcs
82
+ # STORAGE_GCS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
83
+ # STORAGE_GCS_PROJECT_ID="<YOUR_PROJECT_ID>"
84
+ # STORAGE_GCS_FOLDER=""
85
+ # GOOGLE_APPLICATION_CREDENTIALS="/opt/heartex/secrets/key.json"
86
+ #
87
+ # Azure Blob Storage
88
+ # ==================
89
+ #
90
+ # STORAGE_TYPE=azure
91
+ # STORAGE_AZURE_ACCOUNT_NAME="<YOUR_STORAGE_ACCOUNT>"
92
+ # STORAGE_AZURE_ACCOUNT_KEY="<YOUR_STORAGE_KEY>"
93
+ # STORAGE_AZURE_CONTAINER_NAME="<YOUR_CONTAINER_NAME>"
94
+ # STORAGE_AZURE_FOLDER=""
95
+ #
96
+ #
97
+ ################################################################################
98
+
99
+ CMD exec label-studio --host=$SPACE_HOST
README.md ADDED
@@ -0,0 +1,148 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: LabelStudio
3
+ emoji: 🟧
4
+ colorFrom: yellow
5
+ colorTo: purple
6
+ sdk: docker
7
+ tags:
8
+ - label-studio
9
+ fullwidth: true
10
+ license: apache-2.0
11
+ app_port: 8080
12
+ duplicated_from: LabelStudio/LabelStudio
13
+ ---
14
+ <img src="https://user-images.githubusercontent.com/12534576/192582340-4c9e4401-1fe6-4dbb-95bb-fdbba5493f61.png"/>
15
+
16
+ [Website](https://hubs.ly/Q01CNgsd0) β€’ [Docs](https://hubs.ly/Q01CN9Yq0) β€’ [12K+ GitHub ⭐️!](https://hubs.ly/Q01CNbPQ0) β€’ [Slack Community](https://hubs.ly/Q01CNb9H0)
17
+
18
+ ## What is Label Studio?
19
+
20
+ Label Studio is an open source data labeling platform. It lets you label audio,
21
+ text, images, videos, and time series data with a simple, straightforward, and
22
+ highly-configurable user interface. Label Studio can prepare new data or
23
+ improve existing training data to get more accurate ML models.
24
+
25
+
26
+ ## Label Studio in Hugging Face Spaces
27
+
28
+ The Label Studio community is thrilled to offer Label Studio as a Hugging Face
29
+ Spaces application. You can try the data-annotation interface, connect popular
30
+ machine learning models, and share the application with collaborators. You can
31
+ start immediately by creating an account or replicate the space and work in
32
+ your own environment.
33
+
34
+ ## Creating a Use Account and Logging In
35
+
36
+ Begin by creating a new account in the Label Studio space, then log in with your
37
+ credentials.
38
+
39
+ **By default, these spaces permit anyone to create a new login
40
+ account, allowing them to view and modify project configuration, data sets, and
41
+ annotations. Without any modifications, treat this space like a demo environment.**
42
+
43
+ ## Creating a Labeling Project
44
+
45
+ After logging in, Label Studio will present you with a project view. Here you
46
+ can create a new project with prompts to upload data and set up a custom
47
+ configuration interface.
48
+
49
+ **Note that in the default configuration, storage is local and temporary. Any
50
+ projects, annotations, and configurations will be lost if the space is restarted.**
51
+
52
+ ## Next Steps and Additional Resources
53
+
54
+ To help with getting started, the Label Studio community curated a list of
55
+ resources including tutorials and documentation.
56
+
57
+ - πŸš€ [Zero to One with Label Studio Tutorial](https://labelstud.io/blog/introduction-to-label-studio-in-hugging-face-spaces/)
58
+ - πŸ“ˆ [Try Label Studio Enterprise](https://hubs.ly/Q01CMLll0)
59
+ - πŸ€— [Tutorial: Using Label Studio with Hugging Face Datasets Hub](https://danielvanstrien.xyz/huggingface/huggingface-datasets/annotation/full%20stack%20deep%20learning%20notes/2022/09/07/label-studio-annotations-hub.html)
60
+ - πŸ’‘ [Label Studio Docs](https://hubs.ly/Q01CN9Yq0)
61
+
62
+
63
+ ![Gif of Label Studio annotating different types of data](https://raw.githubusercontent.com/heartexlabs/label-studio/master/images/annotation_examples.gif)
64
+
65
+ ### Making your Label Studio Hugging Face Space production-ready
66
+
67
+ By default this space allows for the unrestricted creation of new accounts
68
+ will full access to all projects and data. This is great for trying out
69
+ Label Studio and collaborating on projects, but you may want to restrict
70
+ access to your space to only authorized users. Add the following environment
71
+ variable to your spaces Dockerfile to disable public account creation for
72
+ this space.
73
+
74
+ ENV LABEL_STUDIO_DISABLE_SIGNUP_WITHOUT_LINK=true
75
+
76
+ Set secrets in your space to create an inital user, and log in with your
77
+ provided username and password. Do not set these in your Dockerfile, as they
78
+ globally visible on a public space.
79
+
80
+ LABEL_STUDIO_USERNAME
81
+ LABEL_STUDIO_PASSWORD
82
+
83
+ You will need to provide new users with an invitation link to join the space,
84
+ which can be found in the Organizations interface of Label Studio
85
+
86
+ By default this space stores all project configuration and data annotations
87
+ in local storage with Sqlite. If the space is reset, all configuration and
88
+ annotation data in the space will be lost. You can enable configuration
89
+ persistence by connecting an external Postgres database to your space,
90
+ guaranteeing that all project and annotation settings are preserved.
91
+
92
+ Set the following secret variables to match your own hosted instance of
93
+ Postgres. We strongly recommend setting these as secrets to prevent leaking
94
+ information about your database service to the public in your spaces
95
+ definition.
96
+
97
+ DJANGO_DB=default
98
+ POSTGRE_NAME=<postgres_name>
99
+ POSTGRE_PORT=<db_port>
100
+ POSTGRE_USER=<postgres_user>
101
+ POSTGRE_PASSWORD=<password>
102
+ POSTGRE_PORT=<db_port>
103
+ POSTGRE_HOST=<db_host>
104
+
105
+ Add the following environment variable to remove the warning about ephemeral
106
+ storage.
107
+
108
+ ENV STORAGE_PERSISTENCE=1
109
+
110
+ Note that you will need to connect cloud storage to host data items that you
111
+ want to annotate, as local storage will not be preserved across a space reset.
112
+
113
+ By default the only data storage enabled for this space is local. In the case
114
+ of a space reset, all data will be lost. To enable permanent storage, you
115
+ must enable a cloud storage connector. We also strongly recommend enabling
116
+ configuration persistence to preserve project data, annotations, and user
117
+ settings. Choose the appropriate cloud connector and configure the secrets
118
+ for it.
119
+
120
+ #### Amazon S3
121
+ STORAGE_TYPE=s3
122
+ STORAGE_AWS_ACCESS_KEY_ID="<YOUR_ACCESS_KEY_ID>"
123
+ STORAGE_AWS_SECRET_ACCESS_KEY="<YOUR_SECRET_ACCESS_KEY>"
124
+ STORAGE_AWS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
125
+ STORAGE_AWS_REGION_NAME="<YOUR_BUCKET_REGION>"
126
+ STORAGE_AWS_FOLDER=""
127
+
128
+ #### Google Cloud Storage
129
+
130
+ STORAGE_TYPE=gcs
131
+ STORAGE_GCS_BUCKET_NAME="<YOUR_BUCKET_NAME>"
132
+ STORAGE_GCS_PROJECT_ID="<YOUR_PROJECT_ID>"
133
+ STORAGE_GCS_FOLDER=""
134
+ GOOGLE_APPLICATION_CREDENTIALS="/opt/heartex/secrets/key.json"
135
+
136
+ Azure Blob Storage
137
+ ==================
138
+
139
+ STORAGE_TYPE=azure
140
+ STORAGE_AZURE_ACCOUNT_NAME="<YOUR_STORAGE_ACCOUNT>"
141
+ STORAGE_AZURE_ACCOUNT_KEY="<YOUR_STORAGE_KEY>"
142
+ STORAGE_AZURE_CONTAINER_NAME="<YOUR_CONTAINER_NAME>"
143
+ STORAGE_AZURE_FOLDER=""
144
+
145
+
146
+ ## Questions? Concerns? Want to get involved?
147
+
148
+ Email the community team at [community@labelstud.io](mailto:community@labelstud.io)