Skip to content

Commit

Permalink
Added some missing semi-colons in App.jsx
Browse files Browse the repository at this point in the history
Literally doesn't matter, but it looks a bit more clean.
  • Loading branch information
JoramMillenaar authored Dec 10, 2024
1 parent 14bf689 commit 42c4e94
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions examples/tokenizer-playground/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ function App() {
const tokenizerParam = urlParams.get('tokenizer');
const textParam = urlParams.get('text');

const [tokenIds, setTokenIds] = useState([])
const [decodedTokens, setDecodedTokens] = useState([])
const [margins, setMargins] = useState([])
const [tokenIds, setTokenIds] = useState([]);
const [decodedTokens, setDecodedTokens] = useState([]);
const [margins, setMargins] = useState([]);
const [outputOption, setOutputOption] = useState('text');
const [tokenizer, setTokenizer] = useState(tokenizerParam ?? 'Xenova/gpt-4');
const [customTokenizer, setCustomTokenizer] = useState('');
Expand All @@ -50,9 +50,9 @@ function App() {

// Create a callback function for messages from the worker thread.
const onMessageReceived = (e) => {
setTokenIds(e.data.token_ids)
setDecodedTokens(e.data.decoded)
setMargins(e.data.margins)
setTokenIds(e.data.token_ids);
setDecodedTokens(e.data.decoded);
setMargins(e.data.margins);
};

// Attach the callback function as an event listener.
Expand All @@ -75,7 +75,7 @@ function App() {

if (text.length > 10000) {
setOutputOption(null);
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).')
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).');
}
worker.current.postMessage({ model_id, text });
}, [tokenizer]);
Expand Down

0 comments on commit 42c4e94

Please sign in to comment.