@@ -26,9 +26,9 @@ function App() {
26
26
const tokenizerParam = urlParams . get ( 'tokenizer' ) ;
27
27
const textParam = urlParams . get ( 'text' ) ;
28
28
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 ( [ ] ) ;
32
32
const [ outputOption , setOutputOption ] = useState ( 'text' ) ;
33
33
const [ tokenizer , setTokenizer ] = useState ( tokenizerParam ?? 'Xenova/gpt-4' ) ;
34
34
const [ customTokenizer , setCustomTokenizer ] = useState ( '' ) ;
@@ -50,9 +50,9 @@ function App() {
50
50
51
51
// Create a callback function for messages from the worker thread.
52
52
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 ) ;
56
56
} ;
57
57
58
58
// Attach the callback function as an event listener.
@@ -75,7 +75,7 @@ function App() {
75
75
76
76
if ( text . length > 10000 ) {
77
77
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).' ) ;
79
79
}
80
80
worker . current . postMessage ( { model_id, text } ) ;
81
81
} , [ tokenizer ] ) ;
0 commit comments