text-comment-classification / _next /static /chunks /app /page-7fdffd09ba8574c8.js
bohdan1's picture
Upload 31 files
66989c4
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{3888:function(e,t,r){Promise.resolve().then(r.bind(r,3451))},3451:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return u}});var n=r(7437),s=r(2265);function u(){let[e,t]=(0,s.useState)(null),[u,o]=(0,s.useState)(null),a=(0,s.useRef)(null);(0,s.useEffect)(()=>{a.current||(a.current=new Worker(r.tu(new URL(r.p+r.u(227),r.b)),{type:void 0}));let e=e=>{switch(e.data.status){case"initiate":o(!1);break;case"ready":o(!0);break;case"complete":t(e.data.output)}};return a.current.addEventListener("message",e),()=>a.current.removeEventListener("message",e)});let l=(0,s.useCallback)(e=>{a.current&&a.current.postMessage({text:e})},[]);return(0,n.jsxs)("main",{className:"flex min-h-screen flex-col items-center justify-center p-12",children:[(0,n.jsx)("h1",{className:"text-5xl font-bold mb-5 text-center",children:"Toxic comment classification"}),(0,n.jsx)("input",{className:"w-full max-w-xs p-2 border border-gray-300 rounded mb-4",type:"text",placeholder:"Enter text here",onInput:e=>{l(e.target.value)}}),null!==u&&(0,n.jsx)("pre",{className:"bg-gray-100 p-2 rounded h-auto w-[500px] overflow-scroll shadow",children:u&&e?JSON.stringify(e,null,2):"Loading..."})]})}},622:function(e,t,r){"use strict";/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var n=r(2265),s=Symbol.for("react.element"),u=(Symbol.for("react.fragment"),Object.prototype.hasOwnProperty),o=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function l(e,t,r){var n,l={},c=null,i=null;for(n in void 0!==r&&(c=""+r),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(i=t.ref),t)u.call(t,n)&&!a.hasOwnProperty(n)&&(l[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===l[n]&&(l[n]=t[n]);return{$$typeof:s,type:e,key:c,ref:i,props:l,_owner:o.current}}t.jsx=l,t.jsxs=l},7437:function(e,t,r){"use strict";e.exports=r(622)}},function(e){e.O(0,[971,596,744],function(){return e(e.s=3888)}),_N_E=e.O()}]);