Spaces:
Running
Running
Constantin Orasan
commited on
Commit
·
d5b0375
1
Parent(s):
949e724
Trying to improve the display
Browse files
app.py
CHANGED
|
@@ -11,12 +11,13 @@ examples = [
|
|
| 11 |
def greet(sentence):
|
| 12 |
sp = spm.SentencePieceProcessor()
|
| 13 |
sp.load('bpe.model')
|
| 14 |
-
return " ".join(sp.encode_as_pieces(sentence))
|
| 15 |
|
| 16 |
|
| 17 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text",
|
| 18 |
examples=examples, title="SentencePiece BPE",
|
| 19 |
description="This is a demo for SentencePiece BPE.",
|
| 20 |
cache_examples="lazy",
|
| 21 |
-
concurrency_limit=30
|
|
|
|
| 22 |
demo.launch()
|
|
|
|
| 11 |
def greet(sentence):
|
| 12 |
sp = spm.SentencePieceProcessor()
|
| 13 |
sp.load('bpe.model')
|
| 14 |
+
return " • ".join(sp.encode_as_pieces(sentence))
|
| 15 |
|
| 16 |
|
| 17 |
demo = gr.Interface(fn=greet, inputs="text", outputs="text",
|
| 18 |
examples=examples, title="SentencePiece BPE",
|
| 19 |
description="This is a demo for SentencePiece BPE.",
|
| 20 |
cache_examples="lazy",
|
| 21 |
+
concurrency_limit=30,
|
| 22 |
+
css="textarea {font-size: 150%;}")
|
| 23 |
demo.launch()
|