@@ -26,9 +26,9 @@ function App() {
2626 const tokenizerParam = urlParams . get ( 'tokenizer' ) ;
2727 const textParam = urlParams . get ( 'text' ) ;
2828
29- const [ tokenIds , setTokenIds ] = useState ( [ ] )
30- const [ decodedTokens , setDecodedTokens ] = useState ( [ ] )
31- const [ margins , setMargins ] = useState ( [ ] )
29+ const [ tokenIds , setTokenIds ] = useState ( [ ] ) ;
30+ const [ decodedTokens , setDecodedTokens ] = useState ( [ ] ) ;
31+ const [ margins , setMargins ] = useState ( [ ] ) ;
3232 const [ outputOption , setOutputOption ] = useState ( 'text' ) ;
3333 const [ tokenizer , setTokenizer ] = useState ( tokenizerParam ?? 'Xenova/gpt-4' ) ;
3434 const [ customTokenizer , setCustomTokenizer ] = useState ( '' ) ;
@@ -50,9 +50,9 @@ function App() {
5050
5151 // Create a callback function for messages from the worker thread.
5252 const onMessageReceived = ( e ) => {
53- setTokenIds ( e . data . token_ids )
54- setDecodedTokens ( e . data . decoded )
55- setMargins ( e . data . margins )
53+ setTokenIds ( e . data . token_ids ) ;
54+ setDecodedTokens ( e . data . decoded ) ;
55+ setMargins ( e . data . margins ) ;
5656 } ;
5757
5858 // Attach the callback function as an event listener.
@@ -75,7 +75,7 @@ function App() {
7575
7676 if ( text . length > 10000 ) {
7777 setOutputOption ( null ) ;
78- console . log ( 'User most likely pasted in a large body of text (> 10k chars), so we hide the output (until specifically requested by the user).' )
78+ console . log ( 'User most likely pasted in a large body of text (> 10k chars), so we hide the output (until specifically requested by the user).' ) ;
7979 }
8080 worker . current . postMessage ( { model_id, text } ) ;
8181 } , [ tokenizer ] ) ;
0 commit comments