corasan commited on
Commit
c4dbf82
1 Parent(s): 9fc7882

Update app.py

Browse files

improving the output

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ examples = [
11
  def greet(sentence):
12
  sp = spm.SentencePieceProcessor()
13
  sp.load('bpe.model')
14
- return "<div class='output'>" + "<span class='yellow'> • </span>".join(sp.encode_as_pieces(sentence)) + "</div>"
15
 
16
 
17
  demo = gr.Interface(fn=greet, inputs="text", outputs="html",
@@ -19,5 +19,5 @@ demo = gr.Interface(fn=greet, inputs="text", outputs="html",
19
  description="Demo for SentencePiece BPE.",
20
  cache_examples="lazy",
21
  concurrency_limit=30,
22
- css=".output {font-size: 150%;}; .yellow {background-color: yellow; }")
23
  demo.launch()
 
11
  def greet(sentence):
12
  sp = spm.SentencePieceProcessor()
13
  sp.load('bpe.model')
14
+ return "<div class='output'>" + "<span style='background-color: yellow;'> • </span>".join(sp.encode_as_pieces(sentence)) + "</div>"
15
 
16
 
17
  demo = gr.Interface(fn=greet, inputs="text", outputs="html",
 
19
  description="Demo for SentencePiece BPE.",
20
  cache_examples="lazy",
21
  concurrency_limit=30,
22
+ css=".output {font-size: 150%;}")
23
  demo.launch()