HeshamHaroon commited on
Commit
3567a04
1 Parent(s): 8b17681

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -2
app.py CHANGED
@@ -35,10 +35,29 @@ inputs_component = [
35
  gr.Dropdown(choices=tokenizer_options, label="Select Tokenizer"),
36
  gr.Textbox(lines=2, placeholder="Enter Arabic text here...", label="Input Text")
37
  ]
38
- outputs_component = gr.Dataframe(headers=["Tokenizer", "Tokens", "Encoded Output", "Decoded Text"], label="Results")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
 
40
  # Setting up the interface
41
- iface = Interface(fn=compare_tokenizers, inputs=inputs_component, outputs=outputs_component, title="AraNizer Tokenizer Comparison")
 
 
 
42
 
43
  # Launching the Gradio app
44
  iface.launch()
 
35
  gr.Dropdown(choices=tokenizer_options, label="Select Tokenizer"),
36
  gr.Textbox(lines=2, placeholder="Enter Arabic text here...", label="Input Text")
37
  ]
38
+
39
+ # Custom CSS to make the dataframe bigger
40
+ custom_css = '''
41
+ <style>
42
+ .output_dataframe .dataframe {
43
+ width: auto !important; /* Adjust the width as needed, or use 'auto' */
44
+ font-size: 16px; /* Increase font size */
45
+ }
46
+ .output_dataframe .dataframe tbody tr td {
47
+ padding: 12px !important; /* Increase padding for table cells */
48
+ }
49
+ </style>
50
+ '''
51
+
52
+ outputs_component = gr.Dataframe(headers=["Tokenizer", "Tokens", "Encoded Output", "Decoded Text"],
53
+ label="Results",
54
+ css=custom_css)
55
 
56
  # Setting up the interface
57
+ iface = Interface(fn=compare_tokenizers,
58
+ inputs=inputs_component,
59
+ outputs=outputs_component,
60
+ title="AraNizer Tokenizer Comparison")
61
 
62
  # Launching the Gradio app
63
  iface.launch()