This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +32
-21
lines changed Expand file tree Collapse file tree 1 file changed +32
-21
lines changed Original file line number Diff line number Diff line change @@ -18,19 +18,19 @@ npm install label-studio
1818
1919## Usage
2020
21- ``` html
22-
23- <
link href =
" https://unpkg.com/browse/ [email protected] /build/static/css/main.14acfaa5.css" rel =
" stylesheet" >
21+ ``` xhtml
22+ <!-- Include Label Studio stylesheet -->
23+ <
link href =
" https://unpkg.com/[email protected] /build/static/css/main.14acfaa5.css" rel =
" stylesheet" >
2424
2525<!-- Create the Label Studio container -->
26- <div id =" editor " ></div >
26+ <div id =" label-studio " ></div >
2727
2828<!-- Include the Label Studio library -->
29- <
script src =
" https://unpkg.com/browse/ [email protected] /build/static/js/main.0249ea16.js" ></
script >
29+ <
script src =
" https://unpkg.com/[email protected] /build/static/js/main.0249ea16.js" ></
script >
3030
3131<!-- Initialize Label Studio -->
32- <script >
33- var LS = new LabelStudio (" label-studio " , {
32+ <script >
33+ var labelStudio = new LabelStudio (' editor ' , {
3434 config: `
3535 <View>
3636 <Image name="img" value="$image"></Image>
@@ -41,26 +41,37 @@ npm install label-studio
4141 </View>
4242 ` ,
4343
44+ interfaces: [
45+ " panel" ,
46+ " update" ,
47+ " controls" ,
48+ " side-column" ,
49+ " completions:menu" ,
50+ " completions:add-new" ,
51+ " completions:delete" ,
52+ " predictions:menu" ,
53+ ],
54+
4455 user: {
45- pk: 1 ,
46- firstName: " Awesome " ,
47- lastName: " User "
56+ pk: 1 ,
57+ firstName: " James " ,
58+ lastName: " Dean "
4859 },
4960
5061 task: {
51- completions: [],
52- predictions: [],
53- id: 1 ,
54- data: {
55- image: " https://ls-pub .s3.amazonaws.com/earth.jpeg "
56- }
62+ completions: [],
63+ predictions: [],
64+ id: 1 ,
65+ data: {
66+ image: " https://htx-misc .s3.amazonaws.com/opensource/label-studio/examples/images/nick-owuor-astro-nic-visuals-wDifg5xc9Z4-unsplash.jpg "
67+ }
5768 },
58-
69+
5970 onLabelStudioLoad : function (LS ) {
60- var c = LS .completionStore .addCompletion ({
61- userGenerate: true
62- });
63- LS .completionStore .selectCompletion (c .id );
71+ var c = LS .completionStore .addCompletion ({
72+ userGenerate: true
73+ });
74+ LS .completionStore .selectCompletion (c .id );
6475 }
6576 });
6677 </script >
You can’t perform that action at this time.
0 commit comments