Skip to content

Commit

Permalink
Merge pull request #1124 from AI4Bharat/lsf-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
ishvindersethi22 authored Nov 26, 2024
2 parents 290f0b7 + 6a03417 commit 16011b2
Show file tree
Hide file tree
Showing 10 changed files with 128,234 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/AllTaskLSF.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import PropTypes from 'prop-types'
import React, { useState, useEffect, useRef } from "react";
import LabelStudio from "@heartexlabs/label-studio";
import LabelStudio from "./lsf-build/static/js/main";
import { Tooltip, Button, Alert, Card, TextField, Box, Grid } from "@mui/material";
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/LSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState, useEffect, useRef } from "react";
import ReactQuill, { Quill } from "react-quill";
import "./editor.css";
import "quill/dist/quill.snow.css";
import LabelStudio from "@heartexlabs/label-studio";
import LabelStudio from "./lsf-build/static/js/main";
import {
Tooltip,
Button,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/ReviewLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React, { useState, useEffect, useRef } from "react";
import ReactQuill, { Quill } from 'react-quill';
import "./editor.css"
import 'quill/dist/quill.bubble.css';
import LabelStudio from "@heartexlabs/label-studio";
import LabelStudio from "./lsf-build/static/js/main";
import {
Tooltip,
Button,
Expand Down
2 changes: 1 addition & 1 deletion src/ui/pages/container/Label-Studio/SuperCheckerLSF.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useQuill } from 'react-quilljs';
import ReactQuill, { Quill } from 'react-quill';
import "./editor.css"
import 'quill/dist/quill.snow.css';
import LabelStudio from "@heartexlabs/label-studio";
import LabelStudio from "./lsf-build/static/js/main";
import {
Tooltip,
Button,
Expand Down
125 changes: 125 additions & 0 deletions src/ui/pages/container/Label-Studio/lsf-build/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="shortcut icon" href="/favicon.ico" />
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="//fonts.googleapis.com/css2?family=Roboto:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap" rel="stylesheet">
<link href="//fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&display=swap" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<link rel="stylesheet" href="/styles/main.css">
<title>Label Studio</title>
<script defer src="main.js"></script><link href="main.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.svg" alt="label studio logo">
</a>
<ul id="nav">
<li><a href="https://labelstud.io/guide">Docs</a></li>
<li><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></li>
</ul>
</div>

<div id="ls-container">
<div id="label-studio"></div>
</div>
<footer class="footer">
<span>
Made with <img src="/images/3nowhite.svg" height="16" /> by <a target="_blank" href="https://heartex.net">Heartex</a> in San Francisco
</span>
</footer>

<script>
(function (d, o) {
d.domReady = function (n, a) {
o.addEventListener && o.addEventListener("DOMContentLoaded", function e(t) {
o.removeEventListener("DOMContentLoaded", e), n.call(a || d, t)
}) || o.attachEvent && o.attachEvent("onreadystatechange", function e(t) {
"complete" === o.readyState && (o.detachEvent("onreadystatechange", e), n.call(a || d, t))
})
}
})(window, document);
</script>
<script>
domReady(function () {
var ls = new LabelStudio("label-studio", {
description: "Description",
interfaces: [
"panel",
"update",
"submit",
"skip",
"controls",
//"review",
"infobar",
"topbar",
"instruction",
"side-column",
"ground-truth",
"annotations:history",
"annotations:tabs",
"annotations:menu",
"annotations:current",
"annotations:add-new",
"annotations:delete",
'annotations:view-all',
"predictions:tabs",
"predictions:menu",
"auto-annotation",
"edit-history",
//"topbar:prevnext",
],
user: {
"id": 1,
"first_name": "Nick",
"last_name": "Skriabin",
"username": "nick",
"email": "[email protected]",
"avatar": null,
"initials": "ni",
},
users: [
//{
// "id": 1,
// "first_name": "Nick",
// "last_name": "Skriabin",
// "username": "nick",
// "email": "[email protected]",
// "avatar": null,
// "initials": "ni",
//}
],
task: {
annotations: [],
predictions: [],
id: 1,
data: {
image: "https://htx-misc.s3.amazonaws.com/opensource/label-studio/examples/images/nick-owuor-astro-nic-visuals-wDifg5xc9Z4-unsplash.jpg"
}
},
//history: [{"id":16,"created_by":1,"created_at":"2021-05-26T13:03:36.267438Z","accepted":true,"result":null,"annotation":24,"fixed_annotation_history":null,"previous_annotation_history":33,"previous_annotation_history_result":[{"id":"XsW_x1hflv","type":"labels","value":{"end":838,"text":"Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as we","start":674,"labels":["LOC"]},"to_name":"text","from_name":"label"},{"id":"FCuvjfSXNs","type":"labels","value":{"end":1662,"text":" Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy ","start":1505,"labels":["MISC"]},"to_name":"text","from_name":"label"}]},{"id":17,"created_by":1,"created_at":"2021-05-26T13:03:43.335198Z","accepted":true,"result":null,"annotation":24,"fixed_annotation_history":34,"previous_annotation_history":33,"previous_annotation_history_result":[{"id":"XsW_x1hflv","type":"labels","value":{"end":838,"text":"Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as we","start":674,"labels":["LOC"]},"to_name":"text","from_name":"label"},{"id":"FCuvjfSXNs","type":"labels","value":{"end":1662,"text":" Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy ","start":1505,"labels":["MISC"]},"to_name":"text","from_name":"label"}],"fixed_annotation_history_result":[{"id":"XsW_x1hflv","type":"labels","value":{"end":838,"text":"Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as we","start":674,"labels":["LOC"]},"to_name":"text","from_name":"label"},{"id":"FCuvjfSXNs","type":"labels","value":{"end":1662,"text":" Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy ","start":1505,"labels":["MISC"]},"to_name":"text","from_name":"label"},{"id":"36kM4Zy2Y5","type":"labels","value":{"end":256,"text":"o do and he couldn t do","start":233,"labels":["PER"]},"to_name":"text","from_name":"label"}]},{"id":18,"created_by":1,"created_at":"2021-05-26T13:03:49.330745Z","accepted":true,"result":null,"annotation":24,"fixed_annotation_history":35,"previous_annotation_history":34,"previous_annotation_history_result":[{"id":"XsW_x1hflv","type":"labels","value":{"end":838,"text":"Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as we","start":674,"labels":["LOC"]},"to_name":"text","from_name":"label"},{"id":"FCuvjfSXNs","type":"labels","value":{"end":1662,"text":" Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy ","start":1505,"labels":["MISC"]},"to_name":"text","from_name":"label"},{"id":"36kM4Zy2Y5","type":"labels","value":{"end":256,"text":"o do and he couldn t do","start":233,"labels":["PER"]},"to_name":"text","from_name":"label"}],"fixed_annotation_history_result":[{"id":"XsW_x1hflv","type":"labels","value":{"end":838,"text":"Media, a Happy and Healthy New Year. 2018 will be a great year for America! Donald J. Trump (@realDonaldTrump) December 31, 2017Trump s tweet went down about as we","start":674,"labels":["LOC"]},"to_name":"text","from_name":"label"},{"id":"FCuvjfSXNs","type":"labels","value":{"end":1662,"text":" Sandoval (@AlanSandoval13) December 31, 2017Who uses the word Haters in a New Years wish?? Marlene (@marlene399) December 31, 2017You can t just say happy ","start":1505,"labels":["MISC"]},"to_name":"text","from_name":"label"},{"id":"36kM4Zy2Y5","type":"labels","value":{"end":256,"text":"o do and he couldn t do","start":233,"labels":["PER"]},"to_name":"text","from_name":"label"},{"id":"ALbgPwBdmj","type":"labels","value":{"end":2215,"text":"ale8) December 31, 2017Tr","start":2190,"labels":["MISC"]},"to_name":"text","from_name":"label"}]}],
});

ls.on("regionFinishedDrawing", (region, list) => {
console.log("finish drawing", {region, list})
})
});
</script>
</body>
</html>
69 changes: 69 additions & 0 deletions src/ui/pages/container/Label-Studio/lsf-build/static/css/main.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 16011b2

Please sign in to comment.