Spaces:
Sleeping
Sleeping
Update visualize.py
Browse files- visualize.py +3 -0
visualize.py
CHANGED
|
@@ -66,6 +66,9 @@ def show_embeddings(tokenizer, model, text):
|
|
| 66 |
return fig
|
| 67 |
|
| 68 |
|
|
|
|
|
|
|
|
|
|
| 69 |
def compare_model_sizes():
|
| 70 |
from model_utils import MODEL_OPTIONS
|
| 71 |
from transformers import AutoModel
|
|
|
|
| 66 |
return fig
|
| 67 |
|
| 68 |
|
| 69 |
+
def get_token_list(tokenizer, text):
|
| 70 |
+
return tokenizer.tokenize(text)
|
| 71 |
+
|
| 72 |
def compare_model_sizes():
|
| 73 |
from model_utils import MODEL_OPTIONS
|
| 74 |
from transformers import AutoModel
|