-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* To dev dependencies and keywords * Fix sidebar in docs * Docs & entry point * Build 0.2.1-3 * Added new docs * Added external callbacks and fix rectangle bugs
- Loading branch information
1 parent
ba4ae48
commit 9753780
Showing
27 changed files
with
3,466 additions
and
914 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"main.css": "/static/css/main.05fec320.css", | ||
"main.js": "/static/js/main.0000e798.js", | ||
"main.js.map": "/static/js/main.0000e798.js.map", | ||
"main.js": "/static/js/main.c684fef9.js", | ||
"main.js.map": "/static/js/main.c684fef9.js.map", | ||
"static/media/config.xml": "/static/media/config.1890026d.xml", | ||
"static/css/main.05fec320.css.map": "/static/css/main.05fec320.css.map", | ||
"index.html": "/index.html", | ||
"precache-manifest.5a302afd57d1ff6af418a09b09864a14.js": "/precache-manifest.5a302afd57d1ff6af418a09b09864a14.js", | ||
"precache-manifest.917053f230e58e2ed5b7fcfb9a932a09.js": "/precache-manifest.917053f230e58e2ed5b7fcfb9a932a09.js", | ||
"service-worker.js": "/service-worker.js" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,40 @@ | ||
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="shortcut icon" href="/favicon.ico"/><link href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600|Roboto Mono" rel="stylesheet"/><link href="//fonts.googleapis.com/css?family=Dosis:500&text=LabelStudio" rel="stylesheet"/><meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name="theme-color" content="#000000"><link rel="manifest" href="/manifest.json"><link rel="stylesheet" href="/styles/main.css"><title>Label Studio</title><link href="/static/css/main.05fec320.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="header"><a id="logo" href="/"><img src="./images/ls_logo.png" alt="label studio logo"> <span style="font-size:1.2em">Label Studio</span></a><ul id="nav" style="display:flex;align-items:center"><a style="margin-right:1em;text-decoration:underline" href="https://labelstud.io/guide">Guide</a> <a class="github-button" href="https://github.com/heartexlabs/label-studio" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star heartexlabs/label-studio on GitHub"><img src="./images/GitHub-Mark-64px.png" height="25"/></a></ul></div><div id="label-studio"></div><footer class="footer">Made by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco<br/><br/><img src="./images/3nowhite.svg" height="80"/></footer><script>setTimeout(() => { | ||
var ls = new LabelStudio("label-studio", { | ||
config: `<View> | ||
<Labels name="ner" toName="text"> | ||
<Label value="Person"></Label> | ||
<Label value="Organization"></Label> | ||
<Label value="Location"></Label> | ||
</Labels> | ||
<Text name="text" value="$text"></Text> | ||
</View>`, | ||
config: ` | ||
<View> | ||
<Image name="img" value="$image"></Image> | ||
<RectangleLabels name="tag" toName="img"> | ||
<Label value="Hello"></Label> | ||
<Label value="World"></Label> | ||
</RectangleLabels> | ||
</View> | ||
`, | ||
|
||
expert: {}, | ||
|
||
project: { id: 1 }, | ||
description: "Description", | ||
|
||
interfaces: [ | ||
"controls", | ||
"predictions", | ||
"completions", | ||
"completions:menu", | ||
"predictions:menu", | ||
"panel", | ||
"side-column", | ||
"update", | ||
"check-empty", | ||
], | ||
|
||
expert: { | ||
pk: 1, | ||
firstName: "James", | ||
lastName: "Dean" | ||
}, | ||
|
||
task: { | ||
completions: [], | ||
predictions: [], | ||
id: 1, | ||
data: { | ||
text: "Showers continued throughou" | ||
}, | ||
image: "https://htx-misc.s3.amazonaws.com/opensource/label-studio/examples/images/nick-owuor-astro-nic-visuals-wDifg5xc9Z4-unsplash.jpg" | ||
} | ||
} | ||
}); | ||
}, 2000);</script><script src="/static/js/main.0000e798.js"></script></body></html> | ||
}, 2000);</script><script src="/static/js/main.c684fef9.js"></script></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
build/static/js/main.0000e798.js → build/static/js/main.c684fef9.js
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,13 +10,13 @@ Instantiate a new Label Studio object with a selector for the div that should be | |
|
||
```xhtml | ||
<!-- Include Label Studio stylesheet --> | ||
<link href="" rel="stylesheet"> | ||
<link href="https://unpkg.com/[email protected]/build/static/css/main.05fec320.css" rel="stylesheet"> | ||
|
||
<!-- Create the Label Studio container --> | ||
<div id="editor"></div> | ||
|
||
<!-- Include the Label Studio library --> | ||
<script src=""></script> | ||
<script src="https://unpkg.com/[email protected]/build/static/js/main.0000e798.js"></script> | ||
|
||
<!-- Initialize Label Studio --> | ||
<script> | ||
|
@@ -76,7 +76,9 @@ Take a look at the [Label Studio]("https://labelstud.io") website for more docum | |
<link href="https://unpkg.com/[email protected]/build/static/css/main.05fec320.css" rel="stylesheet"> | ||
``` | ||
|
||
## The following keys are recognized | ||
## Options | ||
|
||
The following keys are recognized | ||
|
||
### config | ||
|
||
|
@@ -94,6 +96,22 @@ Type data: `array` | |
|
||
Collection of modules to include and respective options. | ||
|
||
### description | ||
|
||
Default: `No description` | ||
|
||
Type data: `string` | ||
|
||
Description of the current task. | ||
|
||
### apiCalls | ||
|
||
Default: `true` | ||
|
||
Type data: `boolean` | ||
|
||
Whether to instantiate the Label Studio to API Calls mode. | ||
|
||
### task | ||
|
||
Task data | ||
|
@@ -186,3 +204,48 @@ Type data: `boolean` | |
Default: `false` | ||
|
||
Flag fo labeling of tasks, if the flag is true then after submitting the next task will be called. | ||
|
||
|
||
## Callbacks | ||
|
||
### submitCompletion | ||
|
||
Type data: `function` | ||
|
||
Called when a button `submit` is pressed. `result` is value of current completion. | ||
|
||
#### Example | ||
|
||
```javascript | ||
submitCompletion: function(result) { | ||
console.log(result) | ||
} | ||
``` | ||
|
||
### updateCompletion | ||
|
||
Type data: `function` | ||
|
||
Called when a button `update` is pressed. `result` is value of current completion. | ||
|
||
#### Example | ||
|
||
```javascript | ||
updateCompletion: function(result) { | ||
console.log(result) | ||
} | ||
``` | ||
|
||
### deleteCompletion | ||
|
||
Type data: `function` | ||
|
||
Callback will be called when a button `delete` is pressed. `completion` is value of current completion. | ||
|
||
#### Example | ||
|
||
```javascript | ||
updateCompletion: function(completion) { | ||
console.log(completion) | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.