HeshamHaroon commited on
Commit
890f5a9
·
verified ·
1 Parent(s): d5b1f62

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
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 with a Radio for model selection (pretend grid with inline display)
38
  inputs_component = [
39
- gr.Radio(choices=list(tokenizer_options.values()), label="Select Tokenizer", inline=True),
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