Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,9 @@ def compare_tokenizers(tokenizer_name, text):
|
|
34 |
results = [(tokenizer_name, tokens, encoded_output)]
|
35 |
return results
|
36 |
|
37 |
-
# Define Gradio interface components
|
38 |
inputs_component = [
|
39 |
-
gr.Radio(choices=list(tokenizer_options.values()), label="Select Tokenizer"
|
40 |
gr.Textbox(lines=2, placeholder="Enter Arabic text here...", label="Input Text")
|
41 |
]
|
42 |
# Adjusted outputs to exclude the Decoded Text
|
@@ -47,8 +47,7 @@ iface = Interface(
|
|
47 |
fn=compare_tokenizers,
|
48 |
inputs=inputs_component,
|
49 |
outputs=outputs_component,
|
50 |
-
title="AraNizer Tokenizer Comparison"
|
51 |
-
layout="vertical" # Use the entire vertical space of the browser window
|
52 |
)
|
53 |
|
54 |
# Launching the Gradio app
|
|
|
34 |
results = [(tokenizer_name, tokens, encoded_output)]
|
35 |
return results
|
36 |
|
37 |
+
# Define Gradio interface components
|
38 |
inputs_component = [
|
39 |
+
gr.Radio(choices=list(tokenizer_options.values()), label="Select Tokenizer"),
|
40 |
gr.Textbox(lines=2, placeholder="Enter Arabic text here...", label="Input Text")
|
41 |
]
|
42 |
# Adjusted outputs to exclude the Decoded Text
|
|
|
47 |
fn=compare_tokenizers,
|
48 |
inputs=inputs_component,
|
49 |
outputs=outputs_component,
|
50 |
+
title="AraNizer Tokenizer Comparison"
|
|
|
51 |
)
|
52 |
|
53 |
# Launching the Gradio app
|