Spaces:
Running
Running
Update app.py
Browse filesimproving the output
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
|
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%;}
|
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()
|