Spaces:
Running
Running
File size: 850 Bytes
f1b4ae2 2bd606a 1b7fc74 f1b4ae2 d10ecd7 751936e f1b4ae2 1b7fc74 2bd606a f1b4ae2 1b7fc74 9495a4f 2bd606a 751936e baf4d1e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
import os
from playground_app import demo as playground_tab
from compression_app import demo as compression_tab
from character_app import demo as character_tab
from patcher.gr_interface import TabbedInterface
from huggingface_hub import login
auth_token = os.environ.get('HF_TOKEN', None)
if auth_token:
login(token=auth_token)
# 编码速度,解码速度,字符分类(zh、num等,支持正则),支持的语言,。
demo = TabbedInterface(
[playground_tab, compression_tab, character_tab],
[" ⚔️ Playground", "🏆 Compression Leaderboard", "📊 Character Statistics"],
title='<div align="center">Tokenizer Arena ⚔️</div>',
css="css/style.css"
)
demo.load(js=open("js/onload.js", "r", encoding="utf-8").read())
if __name__ == "__main__":
demo.queue(max_size=1024, default_concurrency_limit=80).launch()
|