Spaces:
Running on Zero
Running on Zero
File size: 704 Bytes
ebc3bf5 6ea3105 ebc3bf5 77105ca ebc3bf5 6102720 1285849 6102720 3c1707e 6102720 47fd22c | 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 27 28 | 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
if __name__ == "__main__":
demo = build_app()
demo.launch(
server_name="0.0.0.0",
server_port=config.SERVER_PORT,
show_error=True,
)
|