Nathan Schneider commited on
Commit
bf04f16
·
1 Parent(s): b3e016c

CSS to prevent tags from wrapping to next line

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -6,6 +6,8 @@ from transformers import pipeline, AutoTokenizer, AutoModelForTokenClassificatio
6
  import torch
7
  import numpy as np
8
 
 
 
9
  #Description text for the Gradio interface
10
  DESCR_TOP = """
11
  <h1 style="text-align: center">SNACS Tagging</h1>
@@ -360,7 +362,7 @@ def classify_tokens(text: str, use_canned=False):
360
  # return f"<pre>{html.escape(repr(e))}</pre>", "", ""
361
 
362
 
363
- with gr.Blocks(title="SNACS Tagging") as demo:
364
  with gr.Row():
365
  description = gr.HTML(DESCR_TOP)
366
 
 
6
  import torch
7
  import numpy as np
8
 
9
+ CUSTOM_CSS = ".textspan { word-break: break-word; white-space: nowrap } /* keep span and tag all on one line */ "
10
+
11
  #Description text for the Gradio interface
12
  DESCR_TOP = """
13
  <h1 style="text-align: center">SNACS Tagging</h1>
 
362
  # return f"<pre>{html.escape(repr(e))}</pre>", "", ""
363
 
364
 
365
+ with gr.Blocks(title="SNACS Tagging", css=CUSTOM_CSS) as demo:
366
  with gr.Row():
367
  description = gr.HTML(DESCR_TOP)
368