File size: 513 Bytes
2a67d66
 
b4dc5cb
2a67d66
737c454
2a67d66
b4dc5cb
2a67d66
 
 
b4dc5cb
 
2a67d66
 
 
 
 
b4dc5cb
2a67d66
 
 
b4dc5cb
 
2a67d66
 
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
26
import os

import gradio as gr
from huggingface_hub import login

from playground_app import demo as playground_tab

auth_token = os.environ.get("HF_TOKEN", None)
if auth_token:
    login(token=auth_token)


title = """
<div align="center">
    <span>Tokenization Playground</span>
</div>
"""

with gr.Blocks() as demo:
    _ = gr.HTML(f"<h1 style='text-align: center; margin-bottom: 1rem'>{title}</h1>")
    _ = playground_tab.render()

if __name__ == "__main__":
    demo.launch()
    # demo.launch(share=True)