tiny-press / app.py
sriharsha-cr's picture
HF Spec changes
b9f16c6
raw
history blame
690 Bytes
import gradio as gr
import config
from ui.compress_tab import build_compress_tab
from ui.history_tab import build_history_tab
from models.model_loader import get_tokenizer_only
try:
get_tokenizer_only() # pre-warm; first keystroke is instant
except Exception:
pass # falls back to lazy load on first keystroke
def build_app() -> gr.Blocks:
with gr.Blocks(title=config.APP_TITLE) as app:
run_store = gr.State(value=[])
build_compress_tab(run_store)
build_history_tab(run_store)
return app
demo = build_app()
if __name__ == "__main__":
demo.launch(
share=False,
server_port=config.SERVER_PORT,
ssr_mode=False,
)