HeshamHaroon commited on
Commit
27c0e8b
1 Parent(s): b613c61

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -63,7 +63,8 @@ tokenizers = {
63
  if meta_llama_tokenizer:
64
  tokenizers["meta-llama/Meta-Llama-3-8B"] = lambda: meta_llama_tokenizer
65
 
66
- def compare_tokenizers(tokenizer_name, text):
 
67
  tokenizer = tokenizers[tokenizer_name]()
68
  tokens = tokenizer.tokenize(text)
69
  encoded_output = tokenizer.encode(text, add_special_tokens=True)
@@ -105,4 +106,4 @@ iface = Interface(
105
  )
106
 
107
  # Launching the Gradio app
108
- iface.launch()
 
63
  if meta_llama_tokenizer:
64
  tokenizers["meta-llama/Meta-Llama-3-8B"] = lambda: meta_llama_tokenizer
65
 
66
+ def compare_tokenizers(tokenizer_index, text):
67
+ tokenizer_name = tokenizer_options[tokenizer_index]
68
  tokenizer = tokenizers[tokenizer_name]()
69
  tokens = tokenizer.tokenize(text)
70
  encoded_output = tokenizer.encode(text, add_special_tokens=True)
 
106
  )
107
 
108
  # Launching the Gradio app
109
+ iface.launch()