Spaces:
Running on Zero
Running on Zero
Tighten GPU duration to measured 45s (warm 0.6s / cold 33s); pass theme+css to launch() per Gradio 6
Browse files27 unmodified lines2829303132313334353690 unmodified lines12712812912813013113213343 unmodified lines17717817917818027 unmodified lines # read_point(image, target, model_choice, mode): the adapter is the 3rd positional arg, # or a keyword; examples only pass (image, target), which lands on the eagerly-loaded 0.8B. mc = kwargs.get("model_choice") or (args[2] if len(args) > 2 else MODEL_CHOICES[0]) # measured on the live Space: warm read 0.6s; cold worker (VRAM streaming + CUDA-graph # capture) 33s -> 45s covers it; a cold 2B adapter still pays a multi-GB download + merge. return 360 if mc not in READERS else 120 return 360 if mc not in READERS else 45
def _load_font(size: int):90 unmodified lines.dark .gradio-container { color: var(--body-text-color); }"""
with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:with gr.Blocks() as demo: with gr.Column(elem_id="col-container"): gr.Markdown( """43 unmodified lines )
if __name__ == "__main__": demo.launch(mcp_server=True) demo.launch(theme=gr.themes.Citrus(), css=CSS, mcp_server=True)app.py+5-3