Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -69,11 +69,19 @@ iface = gr.Interface(
|
|
69 |
fn=compare_tokenizers,
|
70 |
inputs=[
|
71 |
gr.Textbox(label="Enter text to tokenize"),
|
72 |
-
gr.CheckboxGroup(choices=tokenizers, label="Select tokenizers")
|
73 |
],
|
74 |
outputs=gr.HTML(label="Tokenization Results"),
|
75 |
title="Tokenizer Comparison",
|
76 |
description="Compare tokenization results from different tokenizers.",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
)
|
78 |
|
79 |
# Launch the app
|
|
|
69 |
fn=compare_tokenizers,
|
70 |
inputs=[
|
71 |
gr.Textbox(label="Enter text to tokenize"),
|
72 |
+
gr.CheckboxGroup(choices=tokenizers, label="Select tokenizers", value=["bert-base-uncased", "gpt2"])
|
73 |
],
|
74 |
outputs=gr.HTML(label="Tokenization Results"),
|
75 |
title="Tokenizer Comparison",
|
76 |
description="Compare tokenization results from different tokenizers.",
|
77 |
+
examples=[
|
78 |
+
["Hello, world! How are you doing today?", ["bert-base-uncased", "gpt2"]],
|
79 |
+
["The quick brown fox jumps over the lazy dog.", ["roberta-base", "distilbert-base-uncased"]],
|
80 |
+
["Natural Language Processing (NLP) is a subfield of linguistics, computer science, and artificial intelligence.", ["xlnet-base-cased", "bert-base-uncased"]],
|
81 |
+
["Don't you just love Python? It's so versatile!", ["gpt2", "roberta-base"]],
|
82 |
+
["In 2023, AI made significant advancements.", ["distilbert-base-uncased", "xlnet-base-cased"]]
|
83 |
+
],
|
84 |
+
allow_flagging="never"
|
85 |
)
|
86 |
|
87 |
# Launch the app
|